HomeList Manipulation Predict the output: my_list 12 Comments Facebook Twitter Q. Predict the output:my_list = ['p', 'r', 'o', 'b', 'l', 'e', 'm']my_list [2:3] = []print (my_list)my_list[2:5] = []print (my_list)Answer =Output:-['p', 'r', 'b', 'l', 'e', 'm']['p', 'r', 'm']
shouldnt 2nd op be
ReplyDelete['p', 'r', 'e', 'm']
No. If you have doubt then please copy the code and run in IDLE.
Deletei ran and my output is correct.
ReplyDeleteOK : )
Delete: )
ReplyDeletethank u
ReplyDeleteWelcome 😊😊
DeletePlz tell na why e didn't came here
ReplyDeleteBecause we have deleted it in step my_list[2:5] = []
Delete2nd one is p r e m
ReplyDeleteNo you are wrong. Please run in your idle python.
DeleteI can't understand the question
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )