1.

What does “in” do?

Answer»

“in” is a membership operator. It evaluates to true if it finds a variable/string in the specified sequence : Otherwise i+evaluates to false.

(eg) S = “Hello World"

if “Hell” in S:

print “True”

will print True.



Discussion

No Comment Found