English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

What are string literals? Explain. - Computer Science

Advertisements
Advertisements

Question

What are string literals? Explain.

Short Note

Solution

String Literals:

In Python, a string literal is a sequence of characters surrounded by quotes. Python supports single, double, and triple quotes for a string. A character literal is a single character surrounded by single or double-quotes. The value with triple–the quote is used to give multi-line string literal.
Strings = “This is Python”
char = “C”
multiline _ str = “This is a multiline string with more than one line code”.

shaalaa.com
Tokens
  Is there an error in this question or solution?
Chapter 5: Python - Variables and Operators - Evaluation [Page 66]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 5 Python - Variables and Operators
Evaluation | Q 5. | Page 66
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×