Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的清单为:
['t','e','s','t','s','t','r','i','n','g']
如何在每个字符串后添加空字符t, e, s, t, s, t, r, i, n, g?
t
e
s
r
i
n
g
列表理解。
[c + '\0' for c in S]
但它闻起来像你想要 UTF-16LE 代替。
u'teststring'.encode('utf-16le')