![](/img/trans.png)
[英]How to solve the Attribute error 'float' object has no attribute 'split' in python?
[英]how to solve tuple object has no attribute 'split error
我正在嘗試使用以下代碼拆分元組數據,但出現錯誤“AttributeError:'tuple' object has no attribute 'split'”。
request_number = ('1234567.t0',)
id = request_number.split(".")
print(id)
for i in range (len(id)):
print (id[0])
注意:當我將輸入作為字符串時,它工作正常
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.