I am new to python and had a problem, wherein input from the online judge is supposed to be in the form] of a horizontal row of integers. I am trying to store them as a list. input format: 5 4 4 2 2 8 But every time I type in horizontal row of characters I get the error : unexpected EOF while parsing
Is there a way to do it in Python like there is Scanner class in python that easily inputs various data type.
Edit: It will be really helpful if you can tell how do we differentiate which data type is input by the user for the input above can easily considered a String.