List operations | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

List operations

Fill in the blanks to print "Yes" if the list contains 'z': letters = ['a', 'b', 'z'] _ "z" _letters: print("Yes")

13th Apr 2018, 2:57 PM
Tayub Ahmed
Tayub  Ahmed - avatar
1 Answer
+ 2
You need to use if condition and membership operator in if "z" in letters:
13th Apr 2018, 7:16 PM
HBhZ_C
HBhZ_C - avatar