This commit is contained in:
Administrator
2025-12-04 16:51:44 +08:00
parent 9ae9f75a6d
commit 906bef25fc
4 changed files with 72 additions and 19 deletions

12
test.py
View File

@@ -1,11 +1,3 @@
import re
print(abs(100 - 10))
match = re.search(r"可用\s*([0-9,]+(?:\.[0-9]+)?)", "可用1,024.9964 USDT")
number = ""
if match:
# 提取匹配到的数值字符串
number_str = match.group(1).replace(',', '')
# 将提取的字符串转换为浮点数
number = float(number_str)
print(number)
# 3923 3938 16 3932 3938 6