-3

I'm wondering how to read this in from STDIN and store it into into two numeric variables. Thank you

10
20

-Rik

Rik
  • 1,710
  • 2
  • 20
  • 31

1 Answers1

1

In python2.7+:

x=int(raw_input()) #Terminal will stall to allow user to input the first number
y=int(raw_input()) #This will wait for the second number to be inputted

In python3:

x=int(input()) #Terminal will stall to allow user to input the first number
y=int(input()) #This will wait for the second number to be inputted
Academiphile
  • 1,314
  • 1
  • 10
  • 21