quotes or single quotes for string? I am learning Java also and in that we use double quotes for string. Should i use it in python too? Is it good practice?
documentation says it dont change anything
Triple double quotes for doc strings """ Documentation """ For the code there's no real difference
Depends on the string. If the string has double quotes then it would make sense to wrap it in single quotes. And vice versa
No forget about quotes inside quotes. I'm just taking about normal strings
Single and double quotes have no difference in python, whereas in some other languages they do. Anyways if you use a linter (which you should), a common rule is to convert single quotes in simple, non-nested strings, to double quotes
Обсуждают сегодня