strings = ["my", "cartridge", "got", "hitroadige", "by", "a", "truck"] print(max(strings)) # alphabetised print(max(strings, key=lambda x: len(x)))