0

I understand that "a" adds a string of value (a) to someString, and 'a' adds a char of value (a) to someString, but is there a difference in time/space between the two? since they only take up the space of a single char wouldn't this be the same in essence? Is there a preferred method?

1 Answers1

2

You are incorrect. What you are saying comes from C. There is absolutely no difference in Python between single quotes and double quotes. None at all. Python does not have a "char" type. They're just one-character strings.

Tim Roberts
  • 48,973
  • 4
  • 21
  • 30