newbie.string.listless
FMH
shayman at uniserve.com
Sat Sep 1 11:42:52 EDT 2001
Thanks
I was trying to find the "fundamental " way first . Been away from Python
for a while !
"Tyler Eaves" <tyler at tylereaves.com> wrote in message
news:jMYj7.2236$l8.153157 at newsread1.prod.itd.earthlink.net...
> FMH wrote:
>
> > Hi
> > Trying to to process a list and use a string function on each item in
> > the
> > list, then return a new list with the Capitalized items. The output is
> > correct but how do you capture it to a new list. I realize you can't
use
> > a string function on a list but by making a list copy and iterating over
> > the items shouldn't this work.
>
> Well, there is the hacky and ugly way :)
>
> list1=['foo','bar']
> list2=[]
> for x in list1[:]:
> list2.append(string.dosomething(x))
>
>
>
>
More information about the Python-list
mailing list