mode refactoring

This commit is contained in:
Rykov7
2023-01-03 01:35:52 +03:00
parent a83bd54da8
commit 120c347864
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -5,5 +5,4 @@ import random
def speak(chance_of):
number = random.randint(0, chance_of)
if number == 0:
quotes = (i.rstrip() for i in open('Stan.txt', 'r', encoding='utf8'))
return random.choice(quotes)
return random.choice(i.rstrip() for i in open('Stan.txt', 'r', encoding='utf8'))