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']

12 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post