Post

Jacob Hess
Jacob Hess@Jacobhess·
@PythonPr 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.
Jacob Hess tweet mediaJacob Hess tweet media
English
0
0
0
584
mule ear
mule ear@mule_ear75309·
@PythonPr x[0] = 10 will throw an error, but the output will be: (1,2,3) as it is immutable.
English
0
0
0
533
Nishan_py
Nishan_py@Nishan92889·
@PythonPr 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
English
0
0
0
975
Premakumar Thevathasan (Prem Iyer)
@PythonPr 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 =>>
Premakumar Thevathasan (Prem Iyer) tweet media
English
0
0
0
31
sudoku Pseudocode
sudoku Pseudocode@CraigDegeorge·
@PythonPr A, but I suspect [0] may not be whats used for accessing this tuple. Not been studying tuples much.
English
0
0
0
504
James Hurst
James Hurst@Zafaron11·
@PythonPr Can't change a tuple, whatever the f*ck a tuple is.
English
0
0
0
109
Julius Sekitende
Julius Sekitende@juliussekitende·
@PythonPr Now that the comment section gets it, is it “tupo” or “tapo” 😁
English
0
0
0
325
Omkar
Omkar@rumaleomkar01·
@PythonPr Option D because tuple is immutable so if you try to assign the value into the tuple it will throw an error
English
0
0
0
41
Paylaş