python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
product of different length list using itertools in Python
I have the following lists:
sectors = ["A", "B"]
rows = [['1', '2', '3'], ['1', '2', '3', '4']]
seats = [['ab', 'abcd', 'ab'], ['ab', 'abcd', 'ab', 'abcd']]
and I want to create...
tetris555
Votes: 0
Answers: 2
Permutations on lists within lists sequentially
I have two lists and I would like to calculate the permutations between the two. I have been able to successfully do this using itertools, but am having trouble taking it further.
I have two nested li...
lcfields
Votes: 0
Answers: 1
Iterating several lists item by item with Python
Using Python, say I have three lists like this:
list1 = ["ABC","JKL","STU"]
list2 = ["DEF", "MNO", "VWX"]
list3 = ["GHI", "PQ...
Kolumbo
Votes: 0
Answers: 2
How to specify types for itertools groupby?
I've a list of string to be operated upon. And the return type is something like group type consisting of int as a key and a list of string as value.
What i've tried?
from typing import List, Dict, It...
Surya Bhusal
Votes: 0
Answers: 1