+ 1
string is based on list?
just like java's String.class?
3 odpowiedzi
+ 4
This code shows some differences.
https://code.sololearn.com/cRI6FlM4Iip4/?ref=app
+ 2
List can hold a strings and list can be converted into string.string is a string and it can also converted into list.something is similar here.
+ 1
These two are different types, though they have similar methods like indexing. That is why you have to explicitly convert string to a list to make it mutable. You can convert string to list with list function, you can join list values into a string, or you can even convert string representation of a list to real list with ast module functions.