Multi-Line Statements | Python Tutorial

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • How to split a statement across multiple lines using Python. Explicit line joining using the line continuation character \ is discussed, as well as implicit line joining using expressions with parenthesis, square brackets and curly braces, and defining strings across multiple lines with \ and docstrings (triple quote strings). Source code: github.com/por.... Check out www.portfolioc... to build a portfolio that will impress employers!

КОМЕНТАРІ • 3

  • @parosdelos6914
    @parosdelos6914 Місяць тому +1

    When using parenthesis does it also turn the variable type into a tuple?

    • @PortfolioCourses
      @PortfolioCourses  Місяць тому +1

      Not if you do it like in this example. :-) Something like (5 + 6) will not make a tuple, but (5 + 6,) with that comma there will make it a tuple.

    • @parosdelos6914
      @parosdelos6914 Місяць тому

      @@PortfolioCourses I see. Thank you.