Aug-06-2023, 10:04 AM
Lets say we have a string
a = "apple"
and we wish to add this variable in a list fruits = []
, using fruits.append(a)
. But when we print the list, the string "apple"
is stored like this in the list, ['apple']
. So my question now is, why does python not store strings in double qoutes " "
instead of single qoutes ' '
inside a list? or is there a workaround to store strings with double qoutes inside a list? like what's the process behind storing strings in an array or list