Skip to main content

All Questions

2 votes
1 answer
94 views

Skipping an Iteration in a Specific List when Iterating through Multiple Lists

This question is somewhat similar to this question, but different in that it entails multiple lists: I have three lists: a = [1, 2, 3, 4, 5, 6, 7] b = ['ball', 'cat', 'dog', 'elephant', 'baboon', '...
john_mon's user avatar
  • 527
0 votes
2 answers
457 views

How to skip some iterations when using itertools.product?

Suppose there are three sorted lists, A, B, C. A = [1, 2, 3, 4] B = [3, 4, 5] C = [2, 3, 4] I am using itertools.product to find all possible combination whose sum is smaller than 10. If I have three ...
Gilseung Ahn's user avatar
  • 2,624
0 votes
1 answer
814 views

Creating multiple text documents in a for loop

I am trying to create a text file filled with custom generated words in the following format: 3 numbers+2 letters+3 numbers Example: abc00dfe, aaa98fff, and so on. I can achieve what I want using a ...
Egco's user avatar
  • 31