我有一个帐号列表:
list1 = ['1234','3456','2345','5543','1344','5679','6433','3243','0089']
我需要的输出是字符串:
[print(output)
:'1234','3456','2345','5543','1344','5679','6433','3243','0089'
您可以将所有值与','
结合在一起,然后在这样的字符串前后添加'
:
>>> list1 = ['1234','3456','2345','5543','1344','5679','6433','3243','0089']
>>> print(','.join(["'{0}'".format(s) for s in list1]))
'1234','3456','2345','5543','1344','5679','6433','3243','0089'