GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

how to take integer value in a list that too in a single line

how to take integer value in a list that too in a single line values separated by space in python 3.xx

asked Jun 22, 2016 by kashis 1 flag

1 Answer

a = input()     # input =  1 2 3 4 5 6

a = list(map(lambda x: int(x), a.split()))   # a = [1, 2, 3, 4, 5, 6]

answered Jun 24, 2016 by gyanesh_mittal
...