Skip to content

Tutorial: Example input is equivalent to output #136703

@vasan-nz

Description

@vasan-nz

Hello, I found a small issue in the Python tutorial under section 3.1.2 Text at:
Python tutorial section 3.1.2

I noticed in the examples about quoting strings, some lines like these appear twice:

'"Isn\'t," they said.'
'"Isn\'t," they said.'

At first glance, this looks like a duplicate. But from the context, I think the first line shows the string literal with escape characters (what you write in code), and the second line shows how Python displays the string value in the interpreter (the output).
While this is accurate, it might be a bit confusing for beginners since the two lines look identical, but one is code and the other is output.
Also, in the later example with print(), it’s shown that output can look different from the string literal, which is helpful.
Maybe adding a clearer label or explanation in this part to highlight which line is code and which is output would help avoid confusion.

Thanks for considering this suggestion!

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy