python get user input and append line code example
Example 1: get list input from user in python
a = list(map(int,input("\nEnter the numbers : ").strip().split()))
Example 2: reading a list in python
strings = list(map(str,input().split()))
numbers = list(map(int, input().split()))