Python_Institute
PCEP-30-02 · Question #380
Assuming that the following assignment has been successfully executed: My_list = [1, 2, 3] Select the expressions which will not raise any exception. (Select two expressions.)
The correct answer is B. my_list[my_list[1] | 3 | I] D. my_list[0:1]. See the full explanation below for the reasoning.
Question
Assuming that the following assignment has been successfully executed:
My_list = [1, 2, 3]
Select the expressions which will not raise any exception. (Select two expressions.)
Options
- Amy_list[-10]
- Bmy_list[my_list[1] | 3 | I]
- Cmy_list[6]
- Dmy_list[0:1]
How the community answered
(41 responses)- A10% (4)
- B76% (31)
- C15% (6)
Community Discussion
No community discussion yet for this question.