Quote:
|
And if you are looking to make your program more user friendly, raw_input superceeds input
|
And if you want to make your program safe. input() calls eval on what it reads, meaning you can do:
>>> import os
>>> input("Enter a number: ")
os.remove("/")
(goodbye computer if you did that as root) Yes, it's that unsafe.
As for the object-orientated example.. the program gains nothing from the OO. This isn't Java - use OO where it makes sense to do so, not because it looks cool
