Unblocked XYZ

In strings, you may need to find a marker but ignore it when a special character comes right before it. Write a function xyz_there that checks whether the string s contains the substring xyz. Return True only if the found xyz is not directly preceded by a period.

Примеры

Ввод
"abcxyz"
Вывод
True
Ввод
"abc.xyz"
Вывод
False
Ввод
"xyz.abc"
Вывод
True

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

def xyz_there(s: str) -> bool:

Теги

strings
PostgreSQLv16

Siia ilmub koodi käivituse tulemus

Visible tests
1
Input
"abcxyz"
ExpectedTrue
2
Input
"abc.xyz"
ExpectedFalse
3
Input
"xyz.abc"
ExpectedTrue
4
Input
"abcxyz.xyz"
ExpectedTrue
5
Input
".xyz"
ExpectedFalse
6
Input
"12.xyz"
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid