-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,870
  • 3
  • 22
  • 35

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,434
  • 2
  • 13
  • 21