x1, y1, a1, b1, x2, y2 = int(input()), int(input()), int(input()), int(input()), int(input()), int(input())
My problem is to read 6 numbers each given on a new line. How to do that more laconically than my code above?
x1, y1, a1, b1, x2, y2 = (int(input()) for _ in range(6))
Replace range
with xrange
and input
with raw_input
in Python 2.
x,y,z,w=map(int,input().split()) #add input in form 1 2 3 4
>>> x,y,z,w=map(int,input().split())
1 2 3 4
>>> x
1
>>> y
2
>>> w
4
>>> z
3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With