Python Data Science Jobs & Interviews
20.6K subscribers
191 photos
4 videos
25 files
334 links
Your go-to hub for Python and Data Science—featuring questions, answers, quizzes, and interview tips to sharpen your skills and boost your career in the data-driven world.

Admin: @Hussein_Sheikho
Download Telegram
Interview question

Why are strings immutable in Python?

Answer: Because once a string is created, its value cannot be changed. This ensures that strings can be safely used in hashing, as dictionary keys, and in multithreaded environments without causing data corruption. Instead of modifying the string, Python creates a new string object when any operation changes it. This behavior improves performance and security but requires more memory for frequent modifications.

tags: #interview #python #strings

By: t.iss.one/DataScienceQ 🚀
1