python 2.7代码运行出现IndentationError: unindent does not match any outer indentation level
示例代码:
def cmp_ignore_case(s1, s2):
u1 = s1.upper()
u2 = s2.upper()
if u1 < u2:
return -1
if u1 > u2:
return 1
return 0
print sorted(['bob', 'about', 'Zoo', 'Credit'], cmp_ignore_case)
由于u1变量和u2变量代码缩进没有对齐