What is used to represent Strings in Python ?
Answers
Answered by
2
Python is an interpreted, high-level, general-purpose programming language.
To represent Strings in Python, double quotes as well as single quotes.
Bcz, Strings in double quotes work exactly the same way as strings in single quotes.
multi-line strings uses triple quotes.
single quotes and double quotes can be used freely within the triple quotes. An example is
”’This is a multi-line string. This is the first line.
This is the second line.
“What’s your name?,” I asked.
He said “Bond, James Bond.”
Answered by
0
Strings in python are either represented by the apostrophe, quotation marks or the triple quotation marks.
string = ' hi sir '
string = " I'm a coder "
string = """"Hi sir", he said"""
Similar questions
Math,
9 months ago
Computer Science,
9 months ago
Computer Science,
1 year ago
Social Sciences,
1 year ago