+ 1

string is based on list?

just like java's String.class?

8th Aug 2018, 6:21 AM
张博川
张博川 - avatar
3 odpowiedzi
+ 4
This code shows some differences. https://code.sololearn.com/cRI6FlM4Iip4/?ref=app
8th Aug 2018, 8:19 AM
davy hermans
davy hermans - avatar
+ 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.
8th Aug 2018, 7:51 AM
Maninder $ingh
Maninder $ingh - avatar
+ 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.
8th Aug 2018, 8:17 AM
strawdog
strawdog - avatar