Is It Better To Use Double OR Single Quotes in Python?

preview_player
Показать описание
Is it better to use double or single quotes in Python? Today we will be taking a look at the official PEP recommendation regarding this subject.

▶ Become job-ready with Python:

▶ Follow me on Instagram:
Рекомендации по теме
Комментарии
Автор

STRAIGHT TO THE POINT.
we need more people like you

justlikeyourfathersaid
Автор

Strange but, although I always checked this with other languages, I had never read Python's quoting rules (which don't really exists as it seems) so I just went on with what I knew about shell, Tcl, Perl, PHP... it work pretty well though it was just sheer luck as I might have had a lot of confusion as well if I had tried single backslashes between apostrophes.
Good to know...

lxathu
Автор

What do you mean you need a function or class to make a docstring?

immortalsun
Автор

Personally, I’ve always been one for single quotes! I only use double when a string has quotation marks, so I don’t have to escape them.

immortalsun
Автор

I thought this is gonna be about performance :(

mariansam_was_taken
Автор

I'd like to hire you, do you take clients on?

keeganrush
Автор

Single. Why press Shift if you don't have to? Waste of time and energy.

heefbrz
welcome to shbcf.ru