Post

@PythonPr Answer: (B) [2,2,'5','6']
The code initializes list_1 as a list of characters from the string "3456", resulting in ['3', '4', '5', '6'].
Next, the statement list_1[0] = list_1[1] = 2 assigns the integer value 2 to the elements at index 0 and index 1. The elements at index
English

@PythonPr It literally looks like error,but
list("3456") is ['3', '4', '5', '6']
list_1[0] = list_1[1] = 2
Assigns 2 to both indices 0 and 1, so the list becomes:
[2, 2, '5', '6']
And since python allows mixed types in a list, so no error occurs.
Correct answer: B. [2,2,'5','6']
English

@PythonPr B
Assigns 2 to [0] and [1] indexes starting from the right
English











