DEV Community

DDSRY
DDSRY

Posted on • Edited on

What is the difference between = (single equal to) and == (double equal to) in Python 3.8 ?

Difference Between = (single equal to) and == (double equal to) in Python Programming Language:

▪ The = (single equal to) is use to assign the value on the right to a variable
on the left.

▪ The == (double equal to) is use to compare to two values.

Top comments (2)

Collapse
 
senaps profile image
Maysam Senaps

does = and == represent different differences in older python versions?

Collapse
 
ddsry21 profile image
DDSRY

No