How to check if a tuple contains an element in Python?

You use in.

if element in thetuple:
    #whatever you want to do.

Leave a Comment