Input without line break, is it possible?

Michael Torrie torriem at gmail.com
Thu Dec 5 16:21:29 CET 2013


On 12/04/2013 09:36 AM, Mark Lawrence wrote:
> On 04/12/2013 16:23, Michael Torrie wrote:
>> On 12/04/2013 08:38 AM, geezle86 at gmail.com wrote:
>>> my question, can i make it in just a single line like,
>>>
>>> 1 2 3 4 5 6 (and so forth)
>>>
>>> Can I?
>>
>> Yes of course.  raw_input() is going to give you a string that you can
>> then parse any way you want.
>>
> 
> That's it lad, you're in detention for one hour.  You will write 
> repeatedly "I should be selling Python 3 instead of Python 2" :)

Yup. Though if he is using Python 2, then input() is a real no-no.




More information about the Python-list mailing list