
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How do we use double quotation in Python?
Quotation symbols are used to create string object in Python. Python recognizes single, double and triple quoted strings. String literals are written by enclosing a sequence of characters in single quotes ('hello'), or double quotes ("hello")
>>> var1='hello' >>> var1 'hello' >>> var2="hello" >>> var2 'hello'
If single quoted text is to be embedded, string should be written in double quotes.
>>> var="Welcome to 'Python Tutorial' from TutorialsPoint" >>> var "Welcome to 'Python Tutorial' from TutorialsPoint"
- Related Articles
- How do we use Python in interactive mode?
- How do we use Python in script mode?
- How to use quotation marks in HTML?
- Quotation in Python
- Why do we use random.seed() in Python?
- Why do we use pandas in python?
- How do we use re.finditer() method in Python regular expression?
- How do we use equivalence (“equality”) operator in Python classes?
- How do we use easy_install to install Python modules?
- How do we use Python Regular Expression named groups?
- How do we use runOnUiThread in Android?
- How do we use file.readlines() to read multiple lines using Python?
- How do we use # in jQuery Attribute Selector?
- How do we use throw statement in JavaScript?
- Why do we use re.compile() method in Python regular expression?

Advertisements