It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center




已关闭8年。




伪代码中真正的基本语法问题。 :=在伪代码中是什么意思?
a := 1

最佳答案

Wikipedia上的伪代码示例通常使用:=作为赋值运算符,就像Pascal一样(我尚未找到任何反示例)。

您不能直接在Python中使用它,因为它会是SyntaxError:

>>> a := 1
  File "<stdin>", line 1
    a := 1
      ^
SyntaxError: invalid syntax

采用
a = 1

反而。

10-08 02:42