Skip to content

Commit c790535

Browse files
committed
finish 0001 and remove some files in 0000
1 parent 2b9ee28 commit c790535

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

evan69/0000/0000.py~

Lines changed: 0 additions & 21 deletions
This file was deleted.

evan69/0000/100_1.jpg

-10.3 KB
Binary file not shown.

evan69/0000/5_2.png

-76.2 KB
Binary file not shown.

evan69/0001/0001.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
# 做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
3+
4+
import uuid
5+
6+
def produce_str(num = 200):
7+
str_list = []
8+
i = 0
9+
while True:
10+
i = i + 1
11+
if i > num:
12+
break
13+
mystr = str(uuid.uuid1()).replace('-','')
14+
if mystr not in str_list:
15+
str_list.append(mystr)
16+
return str_list
17+
18+
19+
a = produce_str()
20+
print a

0 commit comments

Comments
 (0)