Primeira página
/
Tecnologia
/
What is the major difference between lists and strings in Python?(5 points) Lists are mutable, while strings are immutable. Lists can only contain integers, while strings can contain integers and characters. Lists can only contain letters, while strings can contain numbers. Lists have a fixed size, while strings can vary in size.

Pergunta

What is the major difference between lists and strings in Python?(5 points)
Lists are mutable, while strings are immutable.
Lists can only contain integers, while strings can contain integers and characters.
Lists can only contain letters, while strings can contain numbers.
Lists have a fixed size, while strings can vary in size.

What is the major difference between lists and strings in Python?(5 points) Lists are mutable, while strings are immutable. Lists can only contain integers, while strings can contain integers and characters. Lists can only contain letters, while strings can contain numbers. Lists have a fixed size, while strings can vary in size.

Solução

expert verifiedVerification of experts
4.7315 Voting
avatar
AndrésMestre · Tutor por 5 anos

Responder

The major difference between lists and strings in Python is that lists are mutable, while strings are immutable. This means that you can change the elements in a list after it's created, while you cannot change the characters in a string after it's created.
Clique para avaliar: