Sir , how can we take input a list from the user? i Searched it on google but the solution is not working on jupyter notebook. And if i simply convert the input into list then it is simply considering each and every character as a single element in the list for eg : if i type 11 then it makes list as [‘1’ , ‘1’ ]. What should i do?
Taking Iist as input in python
Hey Shreeniwas, you can use this simple syntax it will split your input elements on the basis of spaces.
lis = [int(x) for x in input().split()]
1 Like