print(*sorted((int(n.strip()) for n in open(“numbers.txt”)), reverse=True)[:3], sep=”\n”)
This solution worked..!
solved Python: Read the file and output the three biggest numbers [closed]
print(*sorted((int(n.strip()) for n in open(“numbers.txt”)), reverse=True)[:3], sep=”\n”)
This solution worked..!
solved Python: Read the file and output the three biggest numbers [closed]