taking input in a list in python

how to take an input which contains elements seperated by spaces into a list in python3.5

l = list(map(int,input().split(’ ')))

   (or) 

you can also use list comprehension

l = [int(x) for x in input().split()]

thank you very much for answering my query

//