Post

Python Developer
Python Developer@PythonDvz·
Comment down your answers in comment section.👨🏻‍💻👨🏻‍💻
Python Developer tweet media
English
2
0
7
985
Saachin Kunwar
Saachin Kunwar@Saachin_Kunwar·
@PythonDvz option C. Tuples are immutable we cannot change their value after creation so, x[1] = 90 this line is invalid. if we convert to list first x = list((10, 20, 30)) x[1] = 90 print(x) output will be [10, 90, 30]
English
0
0
4
132
The Epoch Times
The Epoch Times@EpochTimes·
Tell us what you think.
English
1K
265
3K
609.4K
Sergei Kotov
Sergei Kotov@kotov_dev·
@PythonDvz Answer: C) Error The trap: tuples look indexable — and they are, but only for reading.
English
1
0
2
133
Bergimus
Bergimus@Bergimus_·
@PythonDvz c) Error: Tuple object does not support item assignment.
English
0
0
2
96
akhilesh kumar ojha
akhilesh kumar ojha@kumarakh·
@PythonDvz answer is C)Error. Why it causes an error In Python,the variable x is defined as a tuple(indicated by the parentheses()).Tuples are immutable,meaning once they are created,their elements cannot be changed,added,or removed. TypeError:'tuple' object does not support item assignment
English
0
0
3
136
Fortune ♏
Fortune ♏@fortuneobi141·
@PythonDvz Error, because the variable x is a tuple not a list.
English
0
0
3
68
Paylaş