You are viewing a single comment's thread. Return to all comments →
if name == 'main':
n = int(input())
arr = list(map(int, input().split()))
for i in arr:
if i not in listnew:
hey I am new to python here.can u tell me what is significance of map keyword while taking inputs.
python map() is an iterator.so that we can iterate over elements.
can be converted to tuple ,lists
map is also very usefull to use lambda functinons and it applies function to all items in the input list
yes!!one more point!!
it wont work for multiple max value...
When I tested a few custom test cases with multiple custom values and they passed. Unless, you think there's a test case I missed? If so, I'm curious which test case would this fail?