无效的不可打印字符 U+200B。 Python 3.12.3
days = ('пн', 'вт', 'ср', 'чт', 'пт', 'сб', 'вс')
steps = [5252, 785875, 7858, 787, 8755, 877, 597]
rar = []
for i in range(len(days)):
typle = days[i], steps[i]
rar.append(typle)
print(rar)
甚至不打印第一个元素
days
print(days[0])
rar
末尾确实多了一个字符!
>>> """rar = []
... """
'rar = []\u200b\n'
否则这对我来说效果很好,尽管我会用
zip()
改进它
days = ('пн', 'вт', 'ср', 'чт', 'пт', 'сб', 'вс')
steps = [5252, 785875, 7858, 787, 8755, 877, 597]
rar = []
for day, step in zip(days, steps):
rar.append((day, step))
print(rar)