s = raw_input("Please enter your numbers: ")
mynums = [int(i) for i in s.split()]
# OR
mynums = map(int, s.split())
More Related Contents:
- How do i search for 2 of the same numbers in a list? (python) [closed]
- How to remove an element from a list by index
- List of lists changes reflected across sublists unexpectedly
- How to merge lists into a list of tuples?
- How can I compare two lists in python and return matches
- TypeError: ‘list’ object is not callable in python
- Difference between del, remove, and pop on lists
- Create nice column output in python
- Pythonic way to check if a list is sorted or not
- Python: Finding differences between elements of a list
- List comprehension vs. lambda + filter
- Python – use list as function parameters
- Append to a list defined in a tuple – is it a bug? [duplicate]
- Unsupported operand type(s) for +: ‘int’ and ‘str’ [duplicate]
- String to list in Python
- How to extract parameters from a list and pass them to a function call [duplicate]
- Generate a list of datetimes between an interval
- case-insensitive list sorting, without lowercasing the result?
- Finding first and last index of some value in a list in Python
- python assign values to list elements in loop
- One liner: creating a dictionary from list with indices as keys
- How to add element in Python to the end of list using list.insert?
- Append integer to beginning of list in Python [duplicate]
- Efficient method to calculate the rank vector of a list in Python
- Duplicate each member in a list [duplicate]
- How do I reverse a list using recursion in Python?
- How can I convert string values from a dictionary, into int/float datatypes?
- Python: Elegant and efficient ways to mask a list
- list comprehension with multiple conditions (python)
- How to convert only numbers in a mixed list into float