iteration doesn't seem to work ??

stef s.mientki at id.umcn.nl
Wed May 16 04:41:51 EDT 2007


hello,

can someone tell me why the following iteration doesn't work,
and
how I should replace empty strings in a list with a default value.

 >>> v
['123', '345', '', '0.3']
 >>> for items in v:
...       if items=='':
...           items='3'
...
 >>>
 >>> v
['123', '345', '', '0.3']
 >>>

thanks,
Stef Mientki



More information about the Python-list mailing list