Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
itertools and amazing speed
#4
Thanks!

I didn't try to make a list of itertools.permutations(images,9), but I did run:

for i in perm_set:
    print(i)
After I'd had breakfast it still hadn't finished, so I did ctrl + c. I hadn't looked at how many permutations 9 from 24 gives!

So how much memory will an iterator or generator object like that occupy, can you give an indication?

@dean Thanks for the function. It will take me a while to digest!
Reply


Messages In This Thread
itertools and amazing speed - by Pedroski55 - Nov-07-2022, 04:59 AM
RE: itertools and amazing speed - by ndc85430 - Nov-07-2022, 05:03 AM
RE: itertools and amazing speed - by deanhystad - Nov-07-2022, 05:41 AM
RE: itertools and amazing speed - by Pedroski55 - Nov-07-2022, 11:07 PM
RE: itertools and amazing speed - by bowlofred - Nov-08-2022, 01:04 AM
RE: itertools and amazing speed - by Pedroski55 - Nov-10-2022, 12:49 AM
RE: itertools and amazing speed - by Gribouillis - Nov-10-2022, 03:06 PM
RE: itertools and amazing speed - by Pedroski55 - Nov-10-2022, 11:15 PM
RE: itertools and amazing speed - by Gribouillis - Nov-11-2022, 01:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What happens to a <itertools.permutations object at 0x7fe3cc66af68> after it is read? Pedroski55 3 2,480 Nov-29-2020, 08:35 AM
Last Post: DeaD_EyE
  Making lists using itertools and eliminating duplicates. mike3891 2 2,284 Oct-26-2020, 05:39 PM
Last Post: bowlofred
  Python3 itertools.groupby printing the key august 1 2,126 Aug-17-2020, 05:46 AM
Last Post: bowlofred
  Generate Cartesian Products with Itertools Incrementally CoderMan 2 1,881 Jun-04-2020, 04:51 PM
Last Post: CoderMan
  itertools.zip_shortest() fo unequal iterators Skaperen 10 6,930 Dec-27-2019, 12:17 AM
Last Post: Skaperen
  can itertools compact a list removing all of some value? Skaperen 6 3,274 Sep-02-2019, 03:19 AM
Last Post: Skaperen
  Help with itertools jarrod0987 1 1,851 Jun-10-2019, 02:41 AM
Last Post: Larz60+
  ImportError: No module named jaraco.itertools in Python manhnt 0 3,021 Nov-08-2018, 11:41 AM
Last Post: manhnt
  Need help with itertools.islice() Charles1 2 2,875 Sep-19-2018, 10:32 AM
Last Post: Charles1
  itertools jarrod0987 1 2,520 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