how to take input for 2 variables in one line python code example Example: taking input of n integers in single line python in a list arr = list(map(int, input().split()))