Computer Science

Which two lines of code are valid strings in Python ?

  1. This is a string
  2. 'This is a string'
  3. (This is a string)
  4. "This is a string"

Python String Manipulation

2 Likes

Answer

'This is a string'
"This is a string"

Reason — Strings are enclosed within single or double quotes.

Answered By

1 Like


Related Questions