【发布时间】:2011-09-17 16:13:18
【问题描述】:
我不断收到以下代码行的语法错误:
# If the user asked for celsius then x will be a Celsius number converting to Fahrenheit number
if x = = c
你有什么想法吗?
【问题讨论】:
-
您需要提供更多信息。将确切的错误消息以及周围的代码复制粘贴到上面的
==。顺便说一句,您是否要检查变量x是否包含字母c?如果是这样,请使用if x=="c": -
请显示整个代码。另外:docs.python.org/tutorial/controlflow.html
标签: python-3.x python ipython