Python Forum
combining lists in a dictionary
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
combining lists in a dictionary
#8
I like the solution with chain, but isn't chain already a generator? Can't you just do:

sorted(itertools.chain(*d.values()))
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
combining lists in a dictionary - by Skaperen - Nov-03-2019, 12:18 AM
RE: combining lists in a dictionary - by ichabod801 - Nov-03-2019, 03:04 AM
RE: combining lists in a dictionary - by Skaperen - Nov-03-2019, 11:34 PM
RE: combining lists in a dictionary - by ichabod801 - Nov-03-2019, 11:45 PM
RE: combining lists in a dictionary - by MckJohan - Nov-03-2019, 11:53 PM
RE: combining lists in a dictionary - by Skaperen - Nov-04-2019, 12:45 AM
RE: combining lists in a dictionary - by perfringo - Nov-04-2019, 06:18 AM
RE: combining lists in a dictionary - by ichabod801 - Nov-04-2019, 03:02 PM
RE: combining lists in a dictionary - by perfringo - Nov-04-2019, 03:13 PM
RE: combining lists in a dictionary - by DeaD_EyE - Nov-04-2019, 05:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Using Lists as Dictionary Values bfallert 8 637 Apr-21-2024, 06:55 AM
Last Post: Pedroski55
  combining lists stealth 3 1,711 Feb-08-2022, 04:36 AM
Last Post: deanhystad
  Split dict of lists into smaller dicts of lists. pcs3rd 3 2,543 Sep-19-2020, 09:12 AM
Last Post: ibreeden
  Help: for loop with dictionary and nested lists mart79 1 1,931 Apr-12-2020, 02:52 PM
Last Post: TomToad
  sort lists of lists with multiple criteria: similar values need to be treated equal stillsen 2 3,427 Mar-20-2019, 08:01 PM
Last Post: stillsen

Forum Jump:

User Panel Messages

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