Check if the Same Case

Published by Helen Yu in

Create a function that returns True if an input string contains only uppercase or only lowercase letters.

Examples

same_case("hello") ➞ True

same_case("HELLO") ➞ True

same_case("Hello") ➞ False

same_case("ketcHUp") ➞ False

Notes

N/A

Watch a quick demo on how Edabit works.