Suffix Check

Checking the ending of a string is useful for suffixes, file extensions, and short text rules. Write a function ends_ly that takes a string s and returns True if it ends with ly. In all other cases, return False.

Примеры

Ввод
"oddly"
Вывод
True
Ввод
"y"
Вывод
False
Ввод
"oddy"
Вывод
False

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

def ends_ly(s: str) -> bool:

Теги

strings
PostgreSQLv16

Εδώ θα εμφανιστεί το αποτέλεσμα εκτέλεσης του κώδικα

Visible tests
1
Input
"oddly"
ExpectedTrue
2
Input
"y"
ExpectedFalse
3
Input
"oddy"
ExpectedFalse
4
Input
"ly"
ExpectedTrue
5
Input
""
ExpectedFalse
6
Input
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid