elephant_weight = 3000
ant_weight = 0.1
If elephant_weight > ant_weight:
square()
我得到的错误是:
File "c:/Users/AIRWEBDEV/Documents/exercice.py", line 37
If elephant_weight > ant_weight:
^
SyntaxError: invalid syntax
最佳答案
正确的语法是(注意小写的if
):
if elephant_weight > ant_weight:
square()
关于python - 这个简单的If语句向我发送了SyntaxError : invalid syntax on Python 3.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59791994/