-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path65636.py
More file actions
36 lines (30 loc) · 672 Bytes
/
Copy path65636.py
File metadata and controls
36 lines (30 loc) · 672 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
#65536.py cwc
import random
import datetime
def getDateString():
dt = datetime.datetime.now()
y = dt.year - 2000
hr = dt.hour
if hr < 10:
hr = "0" + str(hr)
me = dt.minute
if me < 10:
me = "0" + str(me)
timestring = str(y) + str(dt.month) + str(dt.day)+"-"+str(hr)+str(me)+"."+str(dt.second)
return timestring
def createRandoms():
filename = getDateString()
filename = filename + ".txt"
f = open(filename, "a")
for i in range (0,65536):
n = random.randint(65, 65+25)
c = chr(n)
f.write(c)
#print(c,end="")
f.close()
def main():
createRandoms()
print("It is done.")
if __name__ == '__main__':
main()
#python 65536.py > 191213-1302.txt