Browse Source

Added lotto.py

master
TeraDyne Ezeri 2 months ago
parent
commit
b35a067622
2 changed files with 12 additions and 0 deletions
  1. 11
    0
      lotto.py
  2. 1
    0
      readme.md

+ 11
- 0
lotto.py View File

@@ -0,0 +1,11 @@
import random
import sys

filename = sys.argv[1]
options = []

with open(filename) as the_file:
for line in the_file:
options.append(line)
print(random.choice(options))

+ 1
- 0
readme.md View File

@@ -2,3 +2,4 @@ Scripts that I keep in my .scripts folder to make things easier.

newinstall - For a fresh install of Fedora
newstory - Creates a folder and copies templates for a new story file and infodoc
lotto.py - Takes a list in a file and chooses an entry (first ever python script for me)

Loading…
Cancel
Save