Random winners from .csv

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cosinus
    New Member
    • Apr 2022
    • 1

    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:
    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
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    You need to post your code directly to the thread
    Please paste the code between [CODE][/CODE] tags
    Most people will not follow links to outside sources.

    Comment

    Working...