python_bot/dicktxt/ForReadDict.py

12 lines
219 B
Python
Raw Normal View History

import random
def RandomDick():
2022-12-16 22:20:11 +10:00
with open('dicktxt/dick_sinonims.txt', 'r', encoding='utf-8') as file:
words = file.readlines()
random_line = random.choice(words).strip()
return random_line