Q. Compare lists with strings. How are they similar and how are they different?


Answer =

Similarity :-

List and string both are used to store value /data and both are sequence.

Difference :-

List are used to store many type of datatypes (string, float, integer, etc)
string are used to store character in single or double quotes.
list are mutable and string are immutable.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post