Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
5 views
in Python by (1.6k points)

According to the documentation, they're pretty much interchangeable. Is there a stylistic reason to use one over the other?

1 Answer

0 votes
by (25.1k points)

In python both single and double quotes are functionally the same, many developers have their preferences, however you can use them interchangeably. One thing to be careful about is if you've started a string with single quotes you can't close it with double quotes e.g.

'abcd' is right, 'abcd" is wrong.

31k questions

32.7k answers

501 comments

693 users

Browse Categories

...