Skip to content

Instantly share code, notes, and snippets.

View scriptorluminary's full-sized avatar

Xylon scriptorluminary

View GitHub Profile
@scriptorluminary
scriptorluminary / SimilarValueComparison.py
Last active November 11, 2021 07:49
In Python, floating‐point numbers and integers with the same value are equal in comparisons, but possibly not in other programming languages.
integer = 5
floating = 5.0
result = False
if integer == floating:
result = True
print(result)