I'm new to programming, and I need to know how to read an integer from a single line of input in python.
2 4 6 8 10
I have tried two methods
1.
arr = input.split(' ')
But this will create an array of string instead of converting them to integers
2.
arr = input.split(' ')
for i,val in enumerate(arr): arr[i] = int(val)
This one works fine, but it would be more perfect if it is a single line solution
please help me !!