Created
July 30, 2018 13:26
-
-
Save RyanMillerC/ab8fb71a7b61d12c4e5c643eb4932dab to your computer and use it in GitHub Desktop.
Revisions
-
Ryan Miller renamed this gist
Jul 30, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Ryan Miller created this gist
Jul 30, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ L = ['value', 'value2', 'value3'] L2 = ['value', 'value2', 'value3'] # Old-Old way for index in range(len(L)): item = L[index] item2 = L2[index] print(item, item2) # Old way for index, item in enumerate(L): item2 = L2[index] print(item, item2) # New way for item, item2 in zip(L, L2): print(item, item2)