Skip to content
Advertisement

why this way of executing python isn’t working

JavaScript

works, and

JavaScript

works, but

JavaScript

gave an error

JavaScript

Could anyone help point out why? Thank you.

Advertisement

Answer

; can only be used to separate “simple” statements, not compound statements.

https://docs.python.org/3/reference/compound_stmts.html

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement