[Tutor] dealing with user input whose value I don't know

Alan Gauld alan.gauld at btinternet.com
Mon Oct 6 01:30:37 CEST 2008


"Omer" <Jaggojaggo+Py at gmail.com> wrote 

>> Here is the code:
>>
>> def main():
>>   import string
>>
> "import string" is unnecessary, mate.

Not entirely true since the code uses string.split()
However since the split method of the string could 
be used instead then that would indeed render the 
import unnecessary. But you need both changes.

Alan G



More information about the Tutor mailing list