how to accept array in a single line 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()))