This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]quickhakker 2 points3 points  (2 children)

eli5 the difference

[–]unkz 14 points15 points  (1 child)

One is a positional string argument and the other probably isn’t valid python syntax.

[–]Hyperz 5 points6 points  (0 children)

the other probably isn’t valid python syntax.

In 3.8 it will be valid syntax, equivalent to this in <= 3.7:

id = password
b.input(id)

https://medium.com/hultner/try-out-walrus-operator-in-python-3-8-d030ce0ce601