Value in the List

Checking whether a value is present comes up all the time, like seeing if an item is in a cart or a user is in a list. Write check, which takes a list seq and a value elem. Return True if the value appears in the list; otherwise return False.

Примеры

Ввод
[66, 101], 66
Вывод
True
Ввод
[78, 117, 110, 99, 104, 117, 107, 115], 100
Вывод
False
Ввод
["t", "e", "s", "t"], "e"
Вывод
True

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

def check(seq: list, elem) -> bool:

Теги

listsarray
PostgreSQLv16

Qui apparirà il risultato dell'esecuzione del codice

Visible tests
1
Input
[66,101], 66
ExpectedTrue
2
Input
[78,117,110,99,104,117,107,115], 100
ExpectedFalse
3
Input
["t","e","s","t"], "e"
ExpectedTrue
4
Input
["what","a","great","kata"], "kat"
ExpectedFalse
5
Input
[1,2,3,4,5,6,7,8,9,0], 0
ExpectedTrue
6
Input
["WHAT","A","GREAT","KATA"], "kat"
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid