Python/error debug
IndentationError: unindent does not match any outer indentation level
kimble2
2024. 8. 4. 16:08
반응형
Incorrect Indentation at the End of a Block
Problematic Code:
def calculate_sum(a, b):
result = a + b
return result
Error Message:
IndentationError: unindent does not match any outer indentation level
Solution: All lines of code within a block should maintain the same level of indentation. The return statement should be inside the function block.
def calculate_sum(a, b):
result = a + b
return result
반응형