What again does the "in" command/operator? | SoloLearn: Learn to code for FREE!

+3

What again does the "in" command/operator?

Sorry for the basic question but it seems impossible to search for a small word like "in"!

in

8/29/2018 2:38:49 PM

Tom Riddle

4 Answers

New Answer

+10

the in command checks to see if a certain variable is in a string or list or something else. a = "0" string = "079844325889" if a in string: print("yes") else: print("no")

+9

Tom Riddle no problem

+3

Thanks a lot! Really helped!

+2

Tom Riddle I have a code for "in" in loops, check it out https://code.sololearn.com/ckYo5k5111Dm/?ref=app