[Tutor] How to make to exit the loop, while typing Enter

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Tue Jan 3 18:57:32 CET 2006



> 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

Hi John,

Do you have ideas why it's getting an error?  Can you point at the part of
the program that's receiving the "Enter"?

As a related question, what result do you expect from:

    int("")

What does Python respond with?



More information about the Tutor mailing list