Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with itertools
#1
Been a while since I did this.

Can't remember how to get from:
[[0], [4, 3, 14], [4, 3, 21], [4, 10, 16]]
to:
[0, 4, 4, 4]
[0, 4, 4, 10]
[0, 4, 4, 16]
[0, 4, 3, 4]
[0, 4, 3, 10]
ETC ETC.

I figure it's product from itertools but I'm not getting anywhere and google results examples don't seem to be working for me.

NM, I forgot about the *.
Reply
#2
so, what have you tried so far?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  itertools and amazing speed Pedroski55 8 1,985 Nov-11-2022, 01:20 PM
Last Post: Gribouillis
  What happens to a <itertools.permutations object at 0x7fe3cc66af68> after it is read? Pedroski55 3 2,356 Nov-29-2020, 08:35 AM
Last Post: DeaD_EyE
  Making lists using itertools and eliminating duplicates. mike3891 2 2,190 Oct-26-2020, 05:39 PM
Last Post: bowlofred
  Python3 itertools.groupby printing the key august 1 2,046 Aug-17-2020, 05:46 AM
Last Post: bowlofred
  Generate Cartesian Products with Itertools Incrementally CoderMan 2 1,812 Jun-04-2020, 04:51 PM
Last Post: CoderMan
  itertools.zip_shortest() fo unequal iterators Skaperen 10 6,582 Dec-27-2019, 12:17 AM
Last Post: Skaperen
  can itertools compact a list removing all of some value? Skaperen 6 3,102 Sep-02-2019, 03:19 AM
Last Post: Skaperen
  ImportError: No module named jaraco.itertools in Python manhnt 0 2,940 Nov-08-2018, 11:41 AM
Last Post: manhnt
  Need help with itertools.islice() Charles1 2 2,787 Sep-19-2018, 10:32 AM
Last Post: Charles1
  itertools jarrod0987 1 2,456 Jul-27-2018, 06:00 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020