feature/hod: import csv s hodnotami
This commit is contained in:
@@ -1,6 +1,18 @@
|
|||||||
from random import randint
|
from random import randint
|
||||||
from os import system, name
|
from os import system, name
|
||||||
import re
|
import re
|
||||||
|
import csv
|
||||||
|
|
||||||
|
hodnoty = {}
|
||||||
|
|
||||||
|
with open("hodnoty.csv", "r") as csv_file:
|
||||||
|
csv_reader = csv.reader(csv_file)
|
||||||
|
|
||||||
|
for row in csv_reader:
|
||||||
|
key = str(row[0])
|
||||||
|
value = str(row[1])
|
||||||
|
|
||||||
|
hodnoty[key] = value
|
||||||
|
|
||||||
def throw(count):
|
def throw(count):
|
||||||
count = int(count)
|
count = int(count)
|
||||||
|
|||||||
Reference in New Issue
Block a user