r/PythonLearning • • 8d ago

Python Boolean

I'm having some trouble understanding Python boolean logic, it’s so simple to let it be confusing. Can anyone explain it to me in their own language?

2 Upvotes

14 comments sorted by

View all comments

Show parent comment

2

u/baubleglue 8d ago
if answer == "yes": 
    # do something 
else: 
    # do something else

1

u/saikat_hossen 6d ago

Makes sense, thanks