We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4174ebb commit 579437bCopy full SHA for 579437b
raffle.py
@@ -4,10 +4,11 @@
4
from random import shuffle
5
parser = argparse.ArgumentParser()
6
parser.add_argument("csv",help = "the location of the csv input")
7
+parser.add_argument("totalWinners", type=int, help="total number of selected winners")
8
args = parser.parse_args()
9
winlist = []
10
csvrow = open(args.csv)
-totalWinners = sum(1 for row in csvrow)
11
+totalWinners = args.totalWinners
12
with open(args.csv) as csvfile:
13
reader = csv.DictReader(csvfile)
14
for row in reader:
0 commit comments