In Python 3.x, use this.
a = [int(x) for x in input().split()]
Example
>>> a = [int(x) for x in input().split()]
3 4 5
>>> a
[3, 4, 5]
>>>
More Related Contents:
- How to input matrix (2D list) in Python?
- How to read an array of integers from single line of input in python3
- How to add numbers inside a variable? [closed]
- Python – get unique and sorted values in list of lists [closed]
- How to sort a list of objects based on an attribute of the objects?
- Pass a list to a function to act as multiple arguments
- How to read a text file into a list or an array with Python
- How to sort two lists (which reference each other) in the exact same way
- Python list multiplication: [[…]]*3 makes 3 lists which mirror each other when modified [duplicate]
- How to read keyboard-input?
- Create an empty list with certain size in Python
- Case insensitive ‘in’
- Changing an element in one list changes multiple lists [duplicate]
- Alphabet range in Python
- Python list confusion [duplicate]
- How do I remove the first item from a list?
- I want to exception handle ‘list index out of range.’
- How to convert nested list of lists into a list of tuples in python 3.3?
- Numpy individual element access slower than for lists
- list.extend and list comprehension [duplicate]
- Pairwise crossproduct in Python [duplicate]
- How to allow list append() method to return the new list
- how to convert list of dict to dict
- Pythonic Circular List
- TypeError: list indices must be integers or slices, not list
- How to combine elements from two lists into a third?
- smartest way to join two lists into a formatted string
- win32: simulate a click without simulating mouse movement?
- Sum list of list elements in python like sql group by [duplicate]
- Python : how to append new elements in a list of list?