Код: Выделить всё
import random
def draw_array(b):
a = b
matches = []
counter1 = 0
counter2 = 1
e = len(a) / 2
for i in range(int(e)):
c = random.choice(a)
a.remove(c)
d = random.choice(a)
a.remove(d)
matches.append(c)
matches.append(d)
for j in range(int(e)):
print(matches[counter1], " Vs ", matches[counter2])
counter1 = counter1 + 2
counter2 = counter2 + 2
def into_array(c):
a = []
linesread = 1
with open(c, "r") as b:
lines = b.readlines()
for i in range(len(lines)):
if linesread
Подробнее здесь: [url]https://stackoverflow.com/questions/79167339/for-some-reason-when-my-program-reads-the-text-file-it-just-reads-empty-string[/url]