Pergunta de entrevista da empresa Brane Enterprises (nslhub)

Why in python string is immutable but in cpp it is mutable?

Resposta da entrevista

Sigiloso

25 de nov. de 2023

I said since in cpp a string is array of chars we can iterate it and mutate its value but unlike cpp in python a string is immutable as it is refferenced from the memory as an object so directly we can not mutate a string in python but we can convert it to a list of chars and then we can mutate it.