why are single quotes used more often than double quotes in python (programming language)?

1 Answer

  • EddieJ
    Lv 7
    1 month ago

    It's a personal preference that can go either way.  I have experience in other programming languages where strings usually use double quotes and single characters using single quotes, so, I'm used to doing it that way.

    A single quote doesn't need to use the [shift] key, so, some people might think it's simply easier to type a single quote.

    Some people might only use double quotes when the string contains a single quote.

Still have questions? Get your answers by asking now.