On Mon, Mar 2, 2009 at 5:36 PM, Network Administrator
wrote:
> I appreciate your explanation about the reserved word "list" as well as the
> code you gently wrote to me. Now, I want to show everybody what I did:
>
> #!/usr/bin/env python
> #
> # This function fills any given li
Thanks, Eric for your help!
I appreciate your explanation about the reserved word "list" as well as the
code you gently wrote to me. Now, I want to show everybody what I did:
#!/usr/bin/env python
#
# This function fills any given list
#
mylist = []
x = 0
while (x != 't2'):
Here is one possible implementation of your project.
*Code:*
#Dont use list as a variable name, its one of the reserved words.
mylist = []
#realize any values captured here are strings
x = raw_input('Enter num or text: ')
mylist.append(x)
x = raw_input('Enter num or text: ')
mylist.append(x)
#ou
Le Fri, 27 Feb 2009 11:19:50 -0600,
Network Administrator s'exprima ainsi:
> I am beggining to learn Python and I appreciate if you help me with this:
>
> "I want a piece of a program to request the user to input "elements"
> (numbers, text, etc) and store them into a list. Then, I want to displ
I am beggining to learn Python and I appreciate if you help me with this:
"I want a piece of a program to request the user to input "elements"
(numbers, text, etc) and store them into a list. Then, I want to display all
the elements one-per-line."
I started using this code:
#!/usr/bin/env python