Skip to content

Comments

Make conditions elegant#1

Open
zlu27 wants to merge 1 commit intoantonl:masterfrom
zlu27:master
Open

Make conditions elegant#1
zlu27 wants to merge 1 commit intoantonl:masterfrom
zlu27:master

Conversation

@zlu27
Copy link

@zlu27 zlu27 commented Feb 20, 2021

if all([a,b]):
    pass
elif any([a,b]):
    # do something
if (a^b):
    # do something

Results are identical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant