Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
List joining
#1
Good day,

I have searched and read and tried options for days... I know it must be simple, yet here I am.

I am creating a list from two user input lists; list_a is a set of tasks that may change from day to day in number and name; and list_b, a set of people who may change from day to day in number. I need list_c (or more) to be an equal distribution of list_b elements to each list_a element. I have the first part, entering the data, saving it, retrieving if needed (they may be the same for a few days). I've dealt with out of range, randomizing, iteration, slicing and splicing, no duplicates, etc. But for some reason, because the lists are user imputed, and not always the same elements, and especially the same number of elements, I just can't seem to find a way to join them properly.

Example
Task list: a, b, c
People list: John, Joe, Karen, Billy, Bob, Lisa, Derek

Desired Output: a: John, Billy, Derek
b: Joe, Bob
c: Karen, Lisa

I'm a noob, I feel like I have exhausted my ability to ask search engines the question in a different way and I've read so many posts my brain hurts...

Any help would be appreciated.
DeatZ
Reply


Messages In This Thread
List joining - by deatz - Dec-05-2022, 07:50 PM
RE: List joining - by deanhystad - Dec-05-2022, 08:48 PM
RE: List joining - by deatz - Dec-06-2022, 12:54 AM
RE: List joining - by deanhystad - Dec-06-2022, 10:07 PM
RE: List joining - by deatz - Dec-07-2022, 05:28 PM
RE: List joining - by deanhystad - Dec-07-2022, 07:39 PM
RE: List joining - by deatz - Dec-08-2022, 12:27 AM
RE: List joining - by deanhystad - Dec-08-2022, 01:42 AM
RE: List joining - by deatz - Dec-15-2022, 01:00 PM
RE: List joining - by deanhystad - Dec-15-2022, 04:16 PM
RE: List joining - by deatz - Dec-15-2022, 04:47 PM
RE: List joining - by deatz - Dec-20-2022, 04:18 PM
RE: List joining - by DeaD_EyE - Dec-15-2022, 04:49 PM
RE: List joining - by deanhystad - Dec-20-2022, 11:40 PM
RE: List joining - by deatz - Dec-21-2022, 03:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using a function: splitting, joining, and slicing a string Drone4four 2 5,807 Dec-27-2018, 07:52 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

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