[Tutor] raw_input (original) (raw)
Hee-Seng Kye kyeser at earthlink.net
Sat Jul 10 02:13:24 CEST 2004
- Previous message: [Tutor] greyscale bitmaps with python
- Next message: [Tutor] raw_input
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Is there a way to make 'raw_input' accept multiple arguments? For example, I wrote this short program which converts temperature to C or F, but I have to enter the temperature and the conversion on two separate lines:
% python conv.py Enter temperature: 30 Is this in C or F?: C 86.00 F
I did this by doing: temp = raw_input("Enter temerature: ") conv = raw_input("Is this in C or F?: ")
How would I be able to enter these two arguments in one line? Like:
% python conv.py Enter temperature: 30 C 86.00 F
Thanks for your help!
- Previous message: [Tutor] greyscale bitmaps with python
- Next message: [Tutor] raw_input
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]