Python mutable object concatenation to list

后端 未结 0 963
别那么骄傲
别那么骄傲 2021-01-18 13:26

I have this lines of code and I dont understand why does it work.

list_ = []
string = \'12345\'
for i in string:
    list_ += i
print(list_)
#Output: [\'1\',          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题