-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToken System.py
More file actions
44 lines (32 loc) · 845 Bytes
/
Token System.py
File metadata and controls
44 lines (32 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from random import randint
l = []
d = {}
a = input("Press y/n :\t")
i = 0
while a == "y":
name = input("Enter name:\t")
n = randint(0, 100)
if n in l == True:
continue
l.append(n)
d[n] = name
if i == 0:
with open("Token_list.txt", mode='w') as f:
f.write("Token_list\n")
f.write("\n Name:\t" + name)
f.write("\n Token:\t{}".format(n))
f.write("\n")
else:
with open("Token_list.txt", mode='a') as f:
f.write("\n Name:\t" + name)
f.write("\n Token:\t{}".format(n))
f.write("\n")
i = i + 1
a = input("Press y/n :\t ")
a = input("Press y/n :\t ")
while a =="y":
key = int(input("Enter key"))
print(d[key])
a = input("Press y/n :\t ")
print(d)
input(".....Thanks for using.....")