gpt4 book ai didi

python - Unindent 不匹配任何外部缩进级别?

转载 作者:太空宇宙 更新时间:2023-11-04 07:10:54 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
IndentationError: unindent does not match any outer indentation level

我有以下 python 代码。

import sys

ins = open( sys.argv[1], "r" )
array = []
for line in ins:
s = line.split()
array.append( s[0] ) # <-- Error here
print array

ins.close()

python解释器提示

  File "sort.py", line 7
array.append( s[0] )
^
IndentationError: unindent does not match any outer indentation level

为什么会这样?以及如何纠正这个错误?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com