Python Question / Quiz; What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇 #python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming

Python_Dv's tweet image. Python Question / Quiz;

What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇

#python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming…

@grok what is the answer


Stream, call, game, and work in even the most remote locations. Order online in minutes


C. Error (TypeError) Strings are immutable. You can't change individual characters. For beginners: › text[1] = 'i' fails › text = text[:1] + 'i' + text[2:] works › text = text.replace('e', 'i', 1) works To modify strings, create a new one!


Error Strings are immutable


The answer is (C) First of all 'text' is a string which is immutable (can't be changed after declaring.) Second, 'text[1]' will expect a list which will also through an error.


Why guess when you can know?


Error String is immutable


@ grok is the answer A ?


Strings are immutable, so you cannot change a character of a string like that. Answer C) Error


c) is the answer coz except lists and dictionary, everything is immutable in Python


A)hillo



Can you beat the average IQ (98)? Take the test now and find out!


United States Trends
Loading...

Something went wrong.


Something went wrong.