On Mon, Mar 2, 2009 at 5:36 PM, Network Administrator
<[email protected]> 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 list
> #
> mylist = []
> x = 0
> while (x != 't2'):
> x = raw_input('Enter IP: ')
> mylist.append(x)
> mylist.pop()
A little more straightforward, perhaps:
mylist = []
while True:
x = raw_input('Enter IP: ')
if x == 't2':
break
mylist.append(x)
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor