我有一个编程任务,我遇到了麻烦。我已经完成了 99%,但正是这些小事让我感到不安。这是我的代码:
a = 0
b = 0
c = 0
for h in first:
a = LetterMap[h]
print(a,end="")
for h in middle:
b = LetterMap[h]
print(b,end="")
for c in last:
c = letterMap[c]
print(c,end="")
这个块和这个块之前的输出是这样的:
first middle last
xxxxxxxxxxxxxxx
我希望它是这样的:
first middle last
xxxxx xxxxxx xxxx