Created
October 17, 2016 13:42
-
-
Save audiolion/26322bb3fd5185c2f93c9ff8c3f75aae to your computer and use it in GitHub Desktop.
loop through items and perform an action at a specified count
This file contains 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
divisor = 100 | |
company_names = ['ALP','FORRESTER','GE Aero', ... ] | |
for index, company_name in enumerate(company_names): | |
if index % divisor == 0 and index != 0: | |
# perform action on each 100 count | |
# perform normal actions outside of tallying 100 if applicable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment