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