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
PostgreSQLv16

Qui apparirà il risultato dell'esecuzione del codice

Visible tests
1
Input
"Hiabc", "abc"
ExpectedTrue
2
Input
"AbC", "HiaBc"
ExpectedTrue
3
Input
"abc", "abXabc"
ExpectedTrue
4
Input
"Hiabc", "abcd"
ExpectedFalse
5
Input
"Hiabc", "bc"
ExpectedTrue
6
Input
"abc", "abc"
ExpectedTrue
Focus radio
Paused · SomaFM · Fluid