The solution to the error of ''.join() in Python

1、sequence item 0: expected str instance, int found

  The reason for this error is that the object in () after join is not of string type, such as:


Here, change print(''.join(a_list)) to print(''.join('%s'%id for id in a_list)). Just try:


Guess you like

Origin blog.csdn.net/wxy_csdn_world/article/details/80755656