Computer Science, asked by ms6179973, 8 months ago

what is the difference between strings and lists in python with example

Answers

Answered by Anonymous
2

\small\orange {\sf{Bonjour\ Mate!}}

\small\green {\sf{Answer }}

Strings and lists are similar, but they are not same and many people don’t know the main difference between a string and a list in python. One simple difference between strings and lists is that lists can any type of data i.e. integers, characters, strings etc, while strings can only hold a set of characters.

Answered by Niharikamishra24
2

Question:-

what is the difference between strings and lists in python with example

{\red{\underline{\underline{\bold{Answer:-}}}}}

  • Strings and Lists are 2 important data types in the suite of structured data types in python.

  • Strings and lists are similar, but they are not same and many people don’t know the main difference between a string and a list in python.

  • One simple difference between strings and lists is that lists can any type of data i.e. integers, characters, strings etc, while strings can only hold a set of characters.

hope it helps you..

Similar questions