On Fri, 2007-08-17 at 17:45 -0500, Robert Dailey wrote:
> [...]
> Secondly, I'm wondering how I can use this method of a for loop to
> append strings to strings in a list. For example:
>
> mylist = [
> "Hello ",
> "Hello again "
> ]
>
> I should be able to do this:
>
> print [ i + "World" for i
Robert Dailey wrote:
> Hi,
>
> I noticed that the 'for' loop can be used inline with a list definition.
> For example:
>
> print [i for i in mylist]
>
> My first question is what is the name for this? I couldn't find this
> usage in the python docs; I only managed to learn about it through cod