Re:Common mistakes made by beginner Python programmers
by wodenokoto on Monday July 01, 2019 @12:33PM
(#20327025)
I get my averages from
sum(list_of_bools) / len(list_of_bools)
and np_array_of_bools.mean()
There is probably a more correct way, but I enjoy it.
Use any/all instead? <https://stackoverflow.com/questions/31099561/test-if-all-ele.... More general (see my other post), shorter and clearer?