Just something quick today I stumbled upon yesterday:
# checking if the variable name has a value
# using the most efficient way
name = input("Enter your name: ")
# this works, but dont do this
if (len(name) > 0):
print("true")
else:
print("false")
# this works also, but it's also bad style
if (name != ""):
print("true")
else:
print("false")
# This is the proper Python way
# if name has a value it checks out true automatically
if (name):
print("true")
else:
print("false")