```
while True:
b = input('请输入小于20数字:')
print('失败,必须输入小于20的')
```
```
a = True
while a:
b = input('请输入小于20数字:')
if int(b)<20:
a = False
else:
print('失败,必须输入小于20的')
```
```
_MAPPING = (u'零', u'一', u'二', u'三', u'四', u'五', u'六', u'七', u'八', u'九', u'十', u'十一', u'十二', u'十三', u'十四', u'十五', u'十六', u'十七',u'十八', u'十九')
def _to_chinese4(num):
if num < 20:
return _MAPPING[num]
a = True
while a:
b = input('请输入小于20数字:')
if int(b)<20:
w = _to_chinese4(int(b))
print(w)
a = False
else:
print('失败,必须输入小于20的')
```
```
f = open('name.txt','a+')
print(f)
b = f.write(u'又加一个字')
print(b)
f.close()
```
```
_MAPPING = (u'零', u'一', u'二', u'三', u'四', u'五', u'六', u'七', u'八', u'九', u'十', u'十一', u'十二', u'十三', u'十四', u'十五', u'十六', u'十七',u'十八', u'十九')
def _to_chinese4(num):
if num < 20:
return _MAPPING[num]
list1 = [1,2,4]
b = len(list1)
a = _to_chinese4(b)
print(a)
import datetime
t = datetime.datetime.now().strftime('%Y年%m月%d日')
print(t)
print(len(list1))
```
- py转exe
- py服务器
- py登录
- py查询
- 爬TB热卖1017
- 爬TB分类1015
- 爬BD文库1010
- 爬文库924
- json917
- decode912
- 转码910
- radians829
- turtle827
- 画叶子820
- 树干815
- Turtle, mainloop718
- sorted716
- random711
- turtle.colormode709
- abs704
- begin_fill702
- randint,random627
- isalpha625
- keyword620
- compile618
- judge613
- list1.copy611
- random.choice606
- format_randint604
- save_csv528
- jieba523
- wordcloud521
- wordcloud516
- jieba.lcut514
- counts503
- format423
- 花瓣418
- strftime416
- turtle.fillcolor411
- random.random409
- pensize404
- 花蕊328
- input327
- eval_float320
- open319
- while314
- JCR影响因子313
- _to_chinese4_312
- encoding306
- read305
- flask1029