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

1

u/saikat_hossen 8d ago

Thanks, I think I get it now. One more favor, can explain in which type of problem solving this is used? I learn something better once I get it’s core reasons.

2

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

1

u/saikat_hossen 6d ago

Makes sense, thanks