Post

Python Programming
Python Programming@PythonPr·
Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
Python Programming tweet media
English
22
5
91
11.7K
Tanmay Newatia
Tanmay Newatia@thetanmaydoes·
@PythonPr none of the above, option a, c, d all the the same. answer would be: [ 'a', 'b', 'c']
English
0
0
5
483
Mariano
Mariano@BJRomPal·
@PythonPr None of the above. There is a typo in a, b and c The output is ['a', 'b', 'c']
English
0
0
5
626
Jenny
Jenny@JennyTheDev·
@PythonPr A) ['a', 'b', 'c'] += on a list iterates over the right side 'c' is iterable (single char), so it appends 'c' Try x += 'cd' and watch chaos unfold
English
1
0
4
792
Haroon Ahmad
Haroon Ahmad@haroona67704564·
@PythonPr Answer ['a', 'b', 'c']. When you use += on a list, Python treats it like the extend() method.
English
1
0
3
777
Ranjan
Ranjan@Ranjanrgdev·
@PythonPr None of this. Because none of this has closed invited comma for C @grok clarify ?
English
1
0
2
246
Himal
Himal@himalbhattaraix·
@PythonPr None of the above
English
0
0
0
236
Abhishek
Abhishek@VoidAndVectors·
@PythonPr Syntax error: None of the above.
English
0
0
0
10
Bilal Abdullah
Bilal Abdullah@Bilal__Abdullah·
@PythonPr @grok Solve all questions in this image and fill blanks at the appropriate places then give me another image same copy of this but solved version you know fully solved correctly and in currency question draw Pakistani rupees
English
0
0
0
2
Gg Galvez
Gg Galvez@GgViewer77·
@PythonPr Either a typo on the multiple choice especially A) or the answer then should be E) None of the selection.
English
0
0
0
15
شیئر