k = ['hi','boss']
k
['hi', 'boss']
k= [s.upper for s in k]
k
[built-in method upper of str object at 0x021B2AF8, built-in method
upper of str object at 0x02283F58]
Why doesn't the python interpreter just return
['HI, 'BOSS'] ?
This isn't a big deal, but I am just curious as
On Feb 17, 2014 12:05 PM, Nir nircher...@gmail.com wrote:
k = ['hi','boss']
k
['hi', 'boss']
k= [s.upper for s in k
S.upper()
k
[built-in method upper of str object at 0x021B2AF8, built-in
method upper of str object at 0x02283F58]
Why doesn't the python interpreter
On 2/17/14 12:00 PM, Nir wrote:
k = ['hi','boss']
k
['hi', 'boss']
k= [s.upper for s in k]
k
[built-in method upper of str object at 0x021B2AF8, built-in method
upper of str object at 0x02283F58]
Why doesn't the python interpreter just return
['HI, 'BOSS'] ?
This isn't a
On 02/17/2014 09:00 AM, Nir wrote:
k = ['hi','boss']
k
['hi', 'boss']
k= [s.upper for s in k]
s.upper is a reference to the method upper of s -- to execute the method
add parens -- s.upper()
Emile
k
[built-in method upper of str object at 0x021B2AF8, built-in method
upper of
Nir nircher...@gmail.com:
k= [s.upper for s in k]
k
[built-in method upper of str object at 0x021B2AF8, built-in
method upper of str object at 0x02283F58]
Why doesn't the python interpreter just return
['HI, 'BOSS'] ?
Try:
k = [ s.upper() for s in k ]
Marko
--
On Mon, Feb 17, 2014 at 11:00 AM, Nir nircher...@gmail.com wrote:
k = ['hi','boss']
k
['hi', 'boss']
k= [s.upper for s in k]
k
[built-in method upper of str object at 0x021B2AF8, built-in
method upper of str object at 0x02283F58]
Why doesn't the python interpreter just
In 9b80c233-ad31-44c8-8a6e-9002ab11b...@googlegroups.com Nir
nircher...@gmail.com writes:
k = ['hi','boss']
k
['hi', 'boss']
k= [s.upper for s in k]
k
[built-in method upper of str object at 0x021B2AF8, built-in
method upper of str object at 0x02283F58]
Why