Python basics-common problems: "SyntaxError: expected an indented block" is displayed when running the code, how to solve it?

When running the code, it prompts "SyntaxError: expected an indented block",
indicating that there is a problem with the indentation. Please check the indentation and adjust it correctly.

Python code has very strict requirements for indentation, and the same level of code must have the same amount of indentation.

image

Guess you like

Origin blog.csdn.net/weixin_42321517/article/details/112514704