- 博客(2)
- 收藏
- 关注
原创 Python实现字符串转换成浮点型数字
使用Python实现float函数from functools import reducedigits = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9}def char2num(s): return digits[s]def str2int(s): retu...
2018-06-07 20:56:13 7354 1
原创 TabError: inconsistent use of tabs and spaces in indentation
Python对缩进敏感,如果混用tab和空格 即使空格数是相同的,也会报这样的错误,需要统一缩进的方式。
2018-06-06 21:21:06 567
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人