Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.2k users

Browse Categories

...