Like Python? Then come test your knowledge with this Python quiz! 🤔 #quiz #python #learning #challenge

PythonPr's tweet image. Like Python? Then come test your knowledge with this Python quiz! 🤔
#quiz #python #learning #challenge

Error , tuples are immutable


A. 10, 2, 3


x = (1, 2, 3) ^ is a tuple, which is immutable (not able to be changed), resulting in the error. x = [1, 2, 3] ^is a list, which could be changed.

_jacobhess's tweet image. x = (1, 2, 3) 
^ is a tuple, which is immutable (not able to be changed), resulting in the error. 

x = [1, 2, 3] 
^is a list, which could be changed.
_jacobhess's tweet image. x = (1, 2, 3) 
^ is a tuple, which is immutable (not able to be changed), resulting in the error. 

x = [1, 2, 3] 
^is a list, which could be changed.

x[0] = 10 will throw an error, but the output will be: (1,2,3) as it is immutable.


D) error , the given problem is about tuple which is immutable so its value can't change and you are trying to change its 0 index value , so ans must be error


Tuples are immutable, so D


المصفوفه بكذا [] فالاقواس هذي تنتج خطا


D). Error


B is the answer


Can't change a tuple, whatever the f*ck a tuple is.


Answer is: D) Error, Tuples are immutable, which means their elements cannot be changed after the tuple is created. The code attempts to modify the first element of the tuple x with the statement x[0] = 10. This action will result in a TypeError at runtime. For More =>>

KumarT00623760's tweet image. Answer is: D) Error,
Tuples are immutable, which means their elements cannot be changed after the tuple is created. The code attempts to modify the first element of the tuple x with the statement x[0] = 10. This action will result in a TypeError at runtime.

For More =>>

A, but I suspect [0] may not be whats used for accessing this tuple. Not been studying tuples much.


Now that the comment section gets it, is it “tupo” or “tapo” 😁


@AkiraHelllsing sem olhar os comentários, diga


United States Trends
Loading...

Something went wrong.


Something went wrong.