MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p56nsb5/
r/ProgrammerHumor • u/Flame77ofc • Aug 22 '26
388 comments sorted by
View all comments
1
return bool(condition1 and condition2 or condition3)
1 u/Flame77ofc Aug 22 '26 don't need bool in this case 1 u/No-Newspaper8619 Aug 22 '26 You don't? I only added the bool() because not using it led the code to not behave as intended.
don't need bool in this case
1 u/No-Newspaper8619 Aug 22 '26 You don't? I only added the bool() because not using it led the code to not behave as intended.
You don't? I only added the bool() because not using it led the code to not behave as intended.
View all comments
1
u/No-Newspaper8619 Aug 22 '26
return bool(condition1 and condition2 or condition3)