Computer Science, asked by nehatomar4052, 1 year ago

Python what is the difference between single and double quotes

Answers

Answered by pecooper2021
1

There is no difference, although you can use single quotes in a double quote string and vice versa. EX: print('He said "hi"') is valid and print("He said 'hi'") is valid.

Answered by Talentedgirl1
1

Answer:

A string as a sequence of characters not intended to have numeric value. In Python, such sequence of characters is included inside single or double quotes. As far as language syntax is concerned, there is no difference in single or double quoted string. Both representations can be used interchangeably.

Similar questions