Strong/weak typing

D'Arcy J.M. Cain darcy at druid.net
Sat Aug 2 09:27:12 EDT 2008


On Fri, 01 Aug 2008 22:47:04 -0400
Mel <mwilson at the-wire.com> wrote:
> middle_name = raw_input ('Name?')
> middle_name = middle_name.split()
> middle_name = middle_name[1]
> 
> It works, but I don't like it enough to actually use it.

Especially since this works better anyway:

middle_name = raw_input ('Name?').split()[1]

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list