Basically, in is used for groups of elements.-It is used for searching purpose also.Example:l=[1,2,3,4]if 2 in l: print("Present")Output:Present
-It is used for searching purpose also.
Example:
l=[1,2,3,4]
if 2 in l:
print("Present")
Output:
Present