Dislocker/temp/password.py

16 lines
313 B
Python
Raw Normal View History

import random
import string
# パスワードをファイルから読み込む
with open('password.txt', 'r') as f:
secret = f.read()
check=int(input("password :"))
if check==int(secret):
print("ok")
secret=0
with open('password.txt', 'w') as file:
file.write('')
else:
print("out")