Expected Ending

This kind of check is useful in real code when you need to know whether a file has the right extension or a string has the expected ending. Write a function solution that checks whether the string st ends with the substring ending. Return True if it does, otherwise return False.

Примеры

Ввод
"abc", "bc"
Вывод
True
Ввод
"abc", "d"
Вывод
False
Ввод
"sumo", "omo"
Вывод
False

Нужно реализовать

def solution(st: str, ending: str) -> bool:

Теги

strings
PostgreSQLv16

Your code output will appear here

Visible tests
1
Input
"abc", "bc"
ExpectedTrue
2
Input
"abc", "d"
ExpectedFalse
3
Input
"sumo", "omo"
ExpectedFalse
4
Input
"abc", ""
ExpectedTrue
5
Input
"samurai", "rai"
ExpectedTrue
6
Input
" ", "omo"
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid