Ending Match
This check is useful when you need to know whether one string is the ending of another, such as a suffix, code, or file-name tail. Write a function end_other that takes two strings a and b. Return True if either string appears at the very end of the other, ignoring uppercase and lowercase differences.
Примеры
Ввод
"Hiabc", "abc"Вывод
TrueВвод
"AbC", "HiaBc"Вывод
TrueВвод
"abc", "abXabc"Вывод
TrueНужно реализовать
def end_other(a: str, b: str) -> bool:
Теги
strings
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inVisible tests
1
Input
"Hiabc", "abc"Expected
True2
Input
"AbC", "HiaBc"Expected
True3
Input
"abc", "abXabc"Expected
True4
Input
"Hiabc", "abcd"Expected
False5
Input
"Hiabc", "bc"Expected
True6
Input
"abc", "abc"Expected
TrueFocus radio
Paused · SomaFM · Fluid