Skip to content

Instantly share code, notes, and snippets.

@HoweChen
Created March 20, 2019 06:48
Show Gist options
  • Save HoweChen/fa15f7e5ff012b3e35f89dd417c3c146 to your computer and use it in GitHub Desktop.
Save HoweChen/fa15f7e5ff012b3e35f89dd417c3c146 to your computer and use it in GitHub Desktop.
[统计boolean列表里正确的结果] #Python
test = [True,True,False,False]
print(sum(test)) # 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment