I am reading a Python book that uses the symbol
<-
It seems to be used interchangeably with the = sign. Is this a normal symbol to explain this? I have never seen it used elsewhere.
I am reading a Python book that uses the symbol
<-
It seems to be used interchangeably with the = sign. Is this a normal symbol to explain this? I have never seen it used elsewhere.
It's not a symbol, it's simply showing that when you make an assignment using '=' you are placing the value on the right into the variable on the left.
a <- b
(better formatted as a < -b
) means "a less than minus b" , so
>>> a = -5
>>> b = 3
>>> a <- b
True
>>> a = 3
>>> b = 4
>>> a <- b
False
In your image, as others have pointed out, the author is just indicating an assignment, it's unfortunate that the typography made it look like code, it wasn't meant to be a "less than minus".