- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Multi-Line Statements in Python
Statements in Python typically end with a new line. Python does, however, allow the use of the line continuation character (\) to denote that the line should continue. For example −
total = item_one + \ item_two + \ item_three
Statements contained within the [], {}, or () brackets do not need to use the line continuation character. For example −
days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']
- Related Articles
- How do we write Multi-Line Statements in Python?
- How to execute Python multi-line statements in the one-line at command-line?
- How to style multi-line conditions in 'if' statements in Python?
- Multi-Line printing in Python
- How to create a long multi-line string in Python?
- Java multi-line comments
- How to put multi-line comments inside a Python dict()?
- How to comment each condition in a multi-line if statement in Python?
- How can we combine multiple print statements per line in Python?
- How to provide multiple statements on a single line in Python?
- How to write multi-line comment in Java?
- How to write multi-line comments in C#?
- What is the difference between single-line and multi-line comments in JavaScript?
- How do we use multi-line comments in JavaScript?
- Multi-dimensional lists in Python

Advertisements