Auto-format code 🧹🌟🤖
This commit is contained in:
parent
9a1b9d1949
commit
93d2047c7a
@ -527,8 +527,8 @@ def chinese_to_number(chinese):
|
|||||||
unit = 1
|
unit = 1
|
||||||
num = 0
|
num = 0
|
||||||
# 处理特殊情况:以"十"开头时,在前面加"一"
|
# 处理特殊情况:以"十"开头时,在前面加"一"
|
||||||
if chinese.startswith('十'):
|
if chinese.startswith("十"):
|
||||||
chinese = '一' + chinese
|
chinese = "一" + chinese
|
||||||
|
|
||||||
# 如果只有一个字符且是单位,直接返回其值
|
# 如果只有一个字符且是单位,直接返回其值
|
||||||
if len(chinese) == 1 and chinese_to_arabic[chinese] >= 10:
|
if len(chinese) == 1 and chinese_to_arabic[chinese] >= 10:
|
||||||
|
Loading…
Reference in New Issue
Block a user