Hi 
    I am trying to write a program in which it ask for
entries for the list , But if I press Enter it  should
exit  the while loop without giving errors ,I have
problem in making it work , right now if I press enter
to exit , the program terminates showing error 
        I am added my script which I wrote 
                              Advice requested 
                                          Thanks 
                                               Joseph

********************************************************************

#
#   How to exit , when user Press Enter
#   While Entering Data
#

# define array
array = []
m = 0
print "Enter  to exit"
m = int(raw_input("Enter the  Values for  The Array : 
"))
array.append(m)
print array
while m != "":
        m = int(raw_input("Enter the  Values for  The
Array :  "))
        array.append(m)
        print array



        
        
                
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to