Mutability of strings - Python and Ruby | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Mutability of strings - Python and Ruby

Why strings are immutable in Python and mutable in Ruby? What are advantages in two cases?

17th Feb 2020, 2:17 PM
Paolo De Nictolis
Paolo De Nictolis - avatar
2 Answers
+ 3
Count Dooku, hello there
17th Feb 2020, 6:10 PM
Salman Nazeer
Salman Nazeer - avatar
+ 2
Not exactly sure about the advantages. I think it has to do something with how both languages store those strings in memory.
17th Feb 2020, 6:08 PM
Salman Nazeer
Salman Nazeer - avatar