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!
When using parenthesis does it also turn the variable type into a tuple?
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.
@@PortfolioCourses I see. Thank you.