Y
Hacker News
new
|
ask
|
show
|
jobs
Ask HN: Why does print (0.1 and 0.1 and 0.1 == 0.3) evaluate to False in Python?
2 points
by
AlexHerbert
1992 days ago
1 comments
edrobap
1992 days ago
Explanation for this behaviour is explained here -
https://docs.python.org/3/library/decimal.html
link
asplake
1991 days ago
Floating point isn't the issue. 'and' is a logical operator here. 0.1 and 0.1 is 0.1.
link
AlexHerbert
1992 days ago
Thank you
link