How do I make a:
if str(variable) == [contains text]:
condition?
(or something, because I am pretty sure that what I just wrote is
The "Pythonic" way to check if a string is empty is:
import random variable = random.choice(l) if variable: # got a non-empty string else: # got an empty string