Univariate Words

Write a boolean function is_univariate_word(s) that, given a string ss, returns True if and only if ss consists of repetitions of one and the same letter, ignoring case differences. For instance: word xxXxXXx is univariate, but xxXxy is not.

Sample session

Problem information

Author: Unknown
Translator: José Luis Balcázar

Generation: 2026-01-25T17:35:41.683Z

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