Se încarcă problema…
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], 66True[78, 117, 110, 99, 104, 117, 107, 115], 100False["t", "e", "s", "t"], "e"Truedef check(seq: list, elem) -> bool:
Conectează-te pentru a vedea istoricul soluțiilor trimise
Conectează-teConectează-te pentru a folosi Mentorul AI
Conectează-te[66,101], 66True[78,117,110,99,104,117,107,115], 100False["t","e","s","t"], "e"True["what","a","great","kata"], "kat"False[1,2,3,4,5,6,7,8,9,0], 0True["WHAT","A","GREAT","KATA"], "kat"False