[Tutor] Oops:

Jim Morcombe jmorcombe at westnet.com.au
Tue Dec 18 03:50:54 CET 2007


I solved my last problem.  The data was string data and of course  '1' is > 5.

Now, if I take int(string) the code will work, except it crashes out when the data is null.  

student.row = int(student.row)
ValueError: invalid literal for int() with base 10: ''

What is the easiest and recomended way of turning the strings into numerics?

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071218/20cd8ba2/attachment.htm 


More information about the Tutor mailing list