List of Longest Words

Write a function longest(h) that, given a list of words h, returns the
list of those words in h 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 h 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-25T16:42:52.679Z

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