Random winners from .csv

Joined
Apr 7, 2022
Messages
1
Reaction score
0
I'm totally new to python. Just trying to find 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:
1. Open csv file
2. Pick chosen number of winners
3. Print and save them to docx
4. Delete them from csv
5. Close csv file
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,748
Latest member
MerryWhitm

Latest Threads

Top