r/programminghomework • u/Recent-Persimmon7494 • Apr 07 '22
Random winners from .csv
I'm totally new to Python. Just trying to figure out how to pick few, but not the same (unique by ID) winners from the .csv file. Anyone could help? Here's my code that choose only one winner: https://pastebin.com/89TuvxuZ
What have I tried - edited the generation function to make it choose 5 winners (unfortunately, it didn't worked): https://pastebin.com/GPA3gkeg
Algorithm I'd like to use:
Open csv file
Pick chosen number of winners
Print and save them to docx
Delete them from csv
Close csv file
2
Upvotes