What do the symbol “=” and “==” mean in python?

When should i use the symbol ‘==’ and when only the symbol ‘=’ is enough? What does the symbol ‘==’ mean in python?

I started python coding 2 weeks ago and these two symbols confused me sometimes. Several times when i used ‘=’, i would get an error message. After i changed it to ‘==’, no error message any more. It seems that ‘==’ can be used in any situation when ‘=’ works. Is it true? Can any one of you explain the principle of using these two symbols?

Greatly appreciate your help!

Leave a Comment