Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
Multi-Line String in Python - CodeGK
Δ Python Examples
Operators
Arithmetic Operators in Python
Assignment Operators in Python
Comparison Operators in Python
Logical Operators in Python
Identity Operators in Python
Membership Operators in Python
Bitwise Operators in Python
Numbers
Python Int
Python Float
Python Complex
Lists
List with same Data Type elements in Python
List with different Data Type elements in Python
Modules
import Python Module
import from module Python
import as Python Module
Lambda
Multiplying two Numbers with Lambda in Python
Function
Python Function to add two numbers or strings
Recursive Function to calculate factorial in Python
Syntax
Syntax in Python
Wrong Syntax in Python
For_loop
Loop Through a Python List
Looping Through a Python String
"Break" in For-Loop in Python
"Continue" in For-Loop in Python
Comments
Single-Line comments in Python
Multi-Line comments in Python
Multi-Line comments in Python Type2
Tuples
Tuples in Python
Strings
Single-Line String in Python
Multi-Line String in Python
Sets
Set in Python
Dictionary
Python Dictionary
Booleans
Boolean calculated upon operations in Python
Self-Possesed Boolean Variables in Python
Miscellaneous Booleans in Python
While_loops
Python While loop for calculating squares
Python While-Break
Python While-Continue
If_elif_else
If in Python
ElIf in Python
Else in Python
Class
Creating a Class in Python
Initializing an Object in Python
__init__() function in Python
♦ Multi-Line String in Python
♣ Example2: Multi-Line String in Python
Multi-Line string can be used for storing large data in a variable.
Example
Input: String assignment in Multiple Lines
Run CODE
Reload Code
Copy Code
multi_line_string="""Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sit amet pretium urna. Vivamus venenatis velit nec neque ultricies, eget elementum magna tristique. Quisque vehicula, risus eget aliquam placerat, purus leo tincidunt eros, eget luctus quam orci in velit. Praesent scelerisque tortor sed accumsan convallis.""" print(multi_line_string)
Output:
Strings
Multi-Line String in Python