1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] f-string affected by quotation [duplicate]

Discussão em 'Python' iniciado por Stack, Setembro 18, 2025.

  1. Stack

    Stack Membro Participativo

    alien_o = {"Colour" : "Green"}
    print(f"The colour is now {alien_o["Colour"]}.")


    What's wrong with these lines of code? The closing bracket and the curly bracket is affected by the quotes, and I don't understand why.

    Continue reading...

Compartilhe esta Página