Last active
December 12, 2016 20:59
-
-
Save djmunro/1539d6ea19765db0372fa3181bdde9ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[-64, 0, 63.5, None] | |
[0, 50, 100, None] | |
[3, 15, 28.5, None] | |
[0, 1, 2, 3] | |
#I have 4 lists like what's seen above. I want a generator, when I call it will return the count of items at 1st, then 2nd,... index | |
#so from the above example, I want the following outpout | |
#>> next(), 4 | |
#>> next(), 4 | |
#>> next(), 4 | |
#>> next(), 1 | |
#so in the case the index of any one of the 4 arrays isn't None, add it to the count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment