[Tutor] (no subject)
Sun, 09 Dec 2001 22:40:23 -0800
At 06:35 PM 12/9/2001 -0500, Kirk Bailey wrote:
>ok, in IDLE I created a variable, listnamemembers, and
>inserted a bunch of info in it, with triple quotes.
>listnamemembers = """email@example.com
Instead of making your data be one long character string,
you might use a list with string elements:
>>> listmembers = ['firstname.lastname@example.org',
>>> for i in listmembers: print i
When you iterate over a list, you get its elements,
whereas when you iterate over a string, you get each
character, which is what was happening when you went
the triple-quotes route.