f = open("numbers.txt", "r")
lst = [int(x) for x in f.read().splitlines()]
maxvalue = max(lst)
This works for me. Best of luck. If you want to test the code in an ide, use print(maxvalue) at the end of the code to see the value of your maxvalue variable.