首页 > 解决方案 > 为什么我的程序有“IndentationError: unindent does not match any external indentation level”?

问题描述

我只是想为一个更大的项目运行一个测试代码,但在中途我得到了这个错误。这是我的代码,我只是希望它可以正常工作。

name=[]
call=[]
position=[]
time=[]
count=0
while True:
    x=[]
    x=input('').split(' ')
    if x[0]=='END':
        break
    elif x[0]=='InsertU':
        name.append(x[2])
        call.append(x[1])
        position.apend('0')
        time.append('0')

    elif x[0]=='InsertL':
        for item in call:
            if item==x[1]:
                position[call.index(x[1])]=(x[2]+x[3])
                name[call.index(x[1])]=(x[4])

print(name)
print(call)
print(position)
print(time)

标签: python-3.x

解决方案


推荐阅读