Python Tips: Must know “Decimal” Vs “Float”
Published in
2 min readJul 4, 2022
In Python DECIMAL and FLOAT both are used to store numerical values. It is sometimes confusing which to use when. Float is an Approximate number data type, which means a float gives you an approximation of the number you declare. Decimal is a Fixed-Precision data type which means the value in the data type is represented exactly with precision and scale, it doesn’t round up the value.