[Tutor] how to take user input to form a list?

Lin Jin jinlin555 at msn.com
Sun Nov 14 02:59:54 CET 2004


hello,all:
  if i want to make a function that takes user input to form a list,how i 
could do that?
it's run like:
>>>Enter 4 letters:
>>>a
>>>b
>>>c
>>>d
>>>[a,b,c,d]
and i write a code like this which is not working:
def list(let1,let2,let3,let4):
   let1,let2,let3,let4=raw_input("enter 4 letters:")
   list=[let1,let2,let3,let4]
   print list

anyone could help me on this? thx

_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer:   http://explorer.msn.com/lccn/  



More information about the Tutor mailing list