13 lines
375 B
Python
13 lines
375 B
Python
import random
|
|
|
|
def random_word(target_index):
|
|
with open('1-1000.txt', 'r', encoding='utf-8') as file:
|
|
for current_index, line in enumerate(file, 1):
|
|
if current_index == target_index:
|
|
return line.strip()
|
|
|
|
buffer = ""
|
|
for i in range(random.randint(10, 20)):
|
|
buffer += random_word(random.randint(1, 1000)) + " "
|
|
|
|
print(buffer.strip()) |