Skip to content

Commit

Permalink
Merge pull request #2 from mb6ockatf/master
Browse files Browse the repository at this point in the history
refactor
  • Loading branch information
IvanIsak2000 committed Apr 30, 2023
2 parents 3de17fe + 1ecc5a1 commit 89d8311
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 31 deletions.
28 changes: 0 additions & 28 deletions __init__.py

This file was deleted.

21 changes: 21 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import secrets


def stalin(language: str, person: str):
if person == 'S':
if language == 'ru':
with open('stalin_ru.txt', 'r', encoding='utf-8') as file:
text = file.read()
text = text.split('\n')
full = 0
for c in text:
full += 1
print(f'\n{secrets.choice(text)}\n--И.В.Сталин.', full)
if language == 'en':
with open('stalin_en.txt', 'r', encoding='utf-8') as file:
text = file.read()
text = text.split('\n')
print(f'\n{secrets.choice(text)} \n--J.V.Stalin.')


stalin('ru', 'S')
Loading

0 comments on commit 89d8311

Please sign in to comment.