List of Longest Words

Write a function longest(h)longest(h) that, given a list of words h, returns the list of those words in hh that attain the longest length, sorted in alphabetical order. The words are arbitrary strings. The output may include repeated words if they appear repeated in hh and fulfill the length condition.

Observation

Only the function will be evaluated. If your submission includes a main program (e.g. with testmod), it must be either commented out or inside a condition if __name__ == ’__main__’

Problem information

Author: José Luis Balcázar

Generation: 2026-01-25T15:51:29.993Z

© Jutge.org, 2006–2026.
https://jutge.org