This is something I am trying to do..
Say, we are entering a string "1 2 3 4 5".so, I want to assign the numbers 
directly as numbers. how can I do it?
I could put that numbers as string but not as number..
strNum = raw_input('enter:').split()
I can convert the list into numbers by doing this...
for i in range(len(strNum)):   strNum[i] = int(strNum[i]).
but I feel, its a long process. How can I do it in the shortest possible way??  
                                  
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to