Convert Any to In

Python pattern

Converts any() functions to simpler in statements.

Convert any to in

BEFORE
if any(hat == "bowler" for hat in hats):
    shout("I have a bowler hat!")

if any(hat > "bowler" for hat in hats):
    shout("I have a bowler hat!")
AFTER
if "bowler" in hats:
    shout("I have a bowler hat!")

if any(hat > "bowler" for hat in hats):
    shout("I have a bowler hat!")