Python Chinese Image operator: = how to use
This article will explain in detail about the python Chinese elephant operator: = how to use it, the editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The walrus operator: = uses a = 6if b:=a+1 > 6: print (b)
Assignment can be performed at the same time, which is similar to the assignment in Go language.
The running order of the code, first calculate axi1 to get a value of 7, and then assign 7 to b, so here the code is equivalent to the following
B = 7if b > 6: print (b) this is the end of the article on "python operator: = how to use it". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.