I don't know why but for loop after printing max value from array does not work. But if I remove print(max(arr)) it works fine.
Input:
3 3 3 34 5
Code:
arr = map(int, set(input().split()))
print(max(arr))
for i in arr:
print(i)
Expected output:
34
3
34
5
Output:
34