[Python] Unexpected output for multiple single quotes

Discussão em 'Python' iniciado por Stack, Janeiro 24, 2025.

  1. Stack

    Stack Membro Participativo

    There are five single quotes before and after variable i like this:

    h='''''i'''''
    print(h)


    Output:

    ''i


    How come?

    Question 2:

    Let's

    x='test'


    On interpreter, if we write x and hit enter then output is 'test'. If we write print(x) and hit enter then output is test. What is the interpreter trying to tell us?

    Continue reading...

Compartilhe esta Página