173k views
5 votes
What is the difference between a list and a string? A. lists are sequences but strings are not and therefore you cannot access a string element using []B. lists are immutable, but strings can be changedC. lists can hold values of any type, whereas strings are only sequences of charactersD. elements in a list can be accessed using an integer as the index value, but strings can use any numeric data type for the index

User Jonho
by
3.9k points

1 Answer

0 votes

Answer:

C.

Step-by-step explanation:

Lists can hold values of any type i.e. integers, characters, strings, etc, whereas strings are only sequences of characters.

The values in the list are called elements.

A list that contains no elements is called an empty list.

The list function is used to break a string into individual letters. The split method can be used to break a string into words.

User Ilya Palkin
by
3.4k points