<map object at 0x7f07ab32b2d0> error shows while printing list of map function,I want to print arr list to screen

1.3k Views Asked by At
n = int(input())
arr = map(int, input().split())
print(arr) #error here

I have map function that splits out list items by comma.

I want to print out arr that contains list.

Then I have to find second highest number from the list.

Can you help?

1

There are 1 best solutions below

0
On
n = int(input())
arr = list(map(int, input().split()))
print(arr) 

define arr as a list.