[Python] round down to 2 decimal in python

Discussão em 'Python' iniciado por Stack, Fevereiro 26, 2025.

  1. Stack

    Stack Membro Participativo

    I need to round down and it should be two decimal places.
    Tried the following,

    a = 28.266
    print round(a, 2)


    28.27
    ​

    But the expected value is 28.26 only.

    Continue reading...

Compartilhe esta Página