- 博客(2)
- 收藏
- 关注
原创 Python中的input
#input的返回值类型是字符串 score=input("请输入成绩:") #将字符串类型转换为int score=int(score) if score>=90: print("A") elif score>=80: print("B") elif score>=70: print("C") elif score>=60: print(
2018-12-06 19:20:45
188
转载 Python的字符串拼接
1 temp = ['There are ',fruit1,',',fruit2,',',fruit3,' on the table'] 2 ''.join(temp) 在Python的实际开发中,很多都需要用到字符串拼接,python中字符串拼接有很多: 用+符号拼接 用%符号拼接 用join()方法拼接 用format()方法拼接 用string模块中的Template对象 ...
2018-12-06 19:12:17
238
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅