Skip to content

Instantly share code, notes, and snippets.

@audiolion
Created October 17, 2016 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save audiolion/26322bb3fd5185c2f93c9ff8c3f75aae to your computer and use it in GitHub Desktop.
Save audiolion/26322bb3fd5185c2f93c9ff8c3f75aae to your computer and use it in GitHub Desktop.
loop through items and perform an action at a specified count
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