Sep-04-2017, 03:54 PM
Just a quick question from a beginner. How would I put a list of 30+ names randomly into 3+ different columns until there are no more names.
List creator
|
||
Sep-04-2017, 03:54 PM
Just a quick question from a beginner. How would I put a list of 30+ names randomly into 3+ different columns until there are no more names.
some psuedo code:
Sep-04-2017, 04:10 PM
Use shuffle from the random package to randomize the list. Then you can just feed it into the different columns. That's if you want an even number of names in each column. If you want to fill them with random lengths, the randrange function from random could choose a different column for each name.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness. Recommended Tutorials: BBCode, functions, classes, text adventures
Sep-04-2017, 04:46 PM
(Sep-04-2017, 04:09 PM)Larz60+ Wrote: some psuedo code: I already have the names to input. Im trying to create a schedule maker. I can generate days off and stuff like that but i still don't know how to put the pre entered names into there columns. I want it to look something like Main------------End----------------Middle james- mon,fri--jack- tue, wed-----frank- sat,sun alex- tue, fri--noelle-, thur,fri--kai- mon,tue Any ideas how i should go about this?
csv documentation: https://docs.python.org/3/library/csv.html
random documentation: https://docs.python.org/3/library/random.html list documentation: https://docs.python.org/3/tutorial/datastructures.html here's a starter:
| ||
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Wanted to tag azure resources with creator name | raham3406 | 0 | 1,901 |
Apr-25-2021, 02:24 PM Last Post: raham3406 |
|
Random Expression Creator | SheeppOSU | 2 | 3,136 |
Nov-01-2018, 11:08 PM Last Post: wavic |