0
Why 'a' and "a" are not same in C?
Why in C - "a" is string and 'a' is character ? But if we type same in Python - "a" and 'a' both are strings, why?
2 odpowiedzi
+ 5
Every programming language has their own datatypes and syntax rules.
In Python, there is only one data type for text: str. So it's most convenient there to just allow all sorts of quotation marks.
In the C's, a single letter and a chain of letters with a specified end (string) are two different things, so you need two different ways to write them.