Created
May 9, 2018 02:47
-
-
Save santosh/5135e9f111be904df16ecc497039f9b6 to your computer and use it in GitHub Desktop.
Itertools module test use.
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
import itertools | |
for x in itertools.count(50, 5): | |
print(x) | |
if x == 80: | |
break | |
for x in itertools.count(50): | |
print(x) | |
if x == 80: | |
break | |
colorsForPainting = ["Red", "Blue", "Yellow", "Green", "Orange", "Purple"] | |
for c in itertools.combinations(colorsForPainting, 3): | |
print(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment