[Python] Print statement inside of input prints an extra "None"

Discussão em 'Python' iniciado por Stack, Junho 8, 2025.

  1. Stack

    Stack Membro Participativo

    I have the following line that's meant to ask for user input, where multi and num are both variables:

    ans = input(print(multi,'x',num,'='))


    This works well, but after it prints the print statement, it also prints "None":

    49 x 7 =
    None


    How can I remove the extra None?

    Continue reading...

Compartilhe esta Página