8 Months
Discussion Span
Last Post by Reverend Jim

Usually you don't do it, you read and parse the input file by various means, for example

>>> import io
>>> stdin = io.StringIO("""34 78""")                                                                       
>>> line = stdin.readline()
>>> line
'34 78'
>>> x, y = (int(s) for s in line.split()[:2])
>>> x, y
(34, 78)

You could perhaps get a better answer by explaining in which context you want to do this.

Edited by Gribouillis


I've to read two numbers separeted by an space and the divide the second one by the first one.


Are you actually unable to read any of the dozens of books or hundreds of introductory web sites that show you how to do this? You are too lazy to Google this yourself, but you expect someone here to spoon feed you the answer to such a simple question.

Votes + Comments
Maybe it's that new code system of "alternate teaching methods."

I have been searching for days but i am not able to find nothing


If you've been searching for days for how to input two numbers and divide one by the other, and you haven't had any luck, then I suggest a career in anything that doesn't involve either computer programming or the internet.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.