[Tutor] upper and lower case input for file name

Alan Gauld alan.gauld at btinternet.com
Sat Dec 15 18:29:40 CET 2007


"earlylight publishing" <earlylightpublishing at yahoo.com> wrote 

>I don't know if this'll help or not but I just learned about this:
>   
>  file = raw_input(info).lower

file = raw_input(prompt).lower()     # note the parens!

>  The .lower is supposed to convert any input to lower case.  

It will indeed. There is also an upper() if you want to make it 
uppercase instead.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld




More information about the Tutor mailing list