Python Tricks #24 - Taking a string input

Words
0
Reading
0 min
Listen
Play
7y
# For example "1 2 3 4" and return [1, 2, 3, 4]

# Remember list being returned has integers in it.
# Don't use more than one line of code.

>>> result = map(lambda x:int(x) ,raw_input().split())
1 2 3 4
>>> result
[1, 2, 3, 4]
Python Tricks #24 - Taking a string input | Ecency