Mar-04-2018, 10:39 PM
(This post was last modified: Mar-04-2018, 10:40 PM by acmichelman.)
Im am creating a schedule maker and am having trouble sorting the end results in an easy to read format. It's only processing from 3 different lists. 'lifeguard' 'Beach' and 'day_off' so does anyone know how to have it sort with names with the same beaches so it would look something like this
(beach 1)(lifeguard 1)(day_off)(day_off).
(beach 1)(lifeguard 2)(day_off)(day_off)
(beach 2)(lifeguard 3)(day_off)(day_off)
This is what I have
(beach 1)(lifeguard 1)(day_off)(day_off).
(beach 1)(lifeguard 2)(day_off)(day_off)
(beach 2)(lifeguard 3)(day_off)(day_off)
This is what I have
import time import random beach = ['Civic','Middle', '2 Chair', 'Main', 'Malibu', 'Nassau 2', 'Nassau 5', 'Reef', 'Anchor', 'E.lido', 'Lido', 'W.Lido', 'Surfing Bay', 'Lido West', 'EAB', 'E.EAB', 'Sea Glades'] lifeguard = ['Rodriguez','Mills', 'L Fitzgerald', 'Laibach', 'Hannon', 'Ruddick', 'Pitzer', 'TFlannigann', 'Vurro', 'Harrington', 'Chase', 'Clarkson', 'Digregorio', 'Nicharkwick', 'Riobo', 'Czartoyski', 'Meringolo', 'Brady', 'Barklow', 'Treadwell', 'Flynn', 'Geodecke', 'Murphy', 'Spinella', 'Joyce', 'TFitzgerald', 'Dreidy', 'EMquade', 'Schroeder', 'Mcveigh', 'Harloff', 'Rtreadwell', 'Cdauria', 'Ochs', 'Mriordan', 'Scibelli', 'Shanley', 'Charkowick', 'Kappel', 'Shutkind', 'Tcrafa', 'BCreigh', 'JCrafa', 'Creagh', 'Fitzpatrick', 'Curry', 'KFlannigan', 'Schlicte', 'Aicher', 'Kinneally', 'CCrafa', 'Fahy', 'Mulloolly', 'Zimmerman', 'Marcote', 'Kluss', 'Wiets', 'Duaria', 'PMquade', 'Campbell', 'Ptucker', 'Henderson', 'Lupia', 'Dunn', 'Rainus', 'lark', 'Peers', 'TLark', 'Martinez', 'Scheinburg', 'Rainus', 'Techera', 'Mcglughlin', 'Carr', 'Farrel', 'Bergin', 'Demeo', 'Trebel', 'Vanella', 'Serrao', 'Brown', 'Paoli', 'Dilsner', 'Swanson', 'JBurns', 'Stapleton', 'Correa', 'Formes', 'Hurst', 'BHarrington', 'Marks', 'MByrne', 'Boccio', 'Neuwieth', 'Babel', 'Hooker', 'Orourke', 'Martinsen', 'Leone', 'Wiessburg', 'Compton', 'Mazur', 'Tucker', 'Kerr', 'Dunster', 'Hutchinson', 'TFahy', 'Giordana', 'Hughes', 'Mahony', 'Gallego', 'CoNewby', 'Vitale', 'Shineburg', 'Longo', 'Michelman', 'Henne'] days_off = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] for i in lifeguard: random.shuffle(lifeguard) win = lifeguard.pop() print (" %s" % win) random.shuffle(beach) win = beach[1] print (" %s" % win) random.shuffle(days_off) win = days_off[:2] print (" %s" % win) print("--------------")