adplus-dvertising
frame-decoration

Question

What will be the output?
veggies = ['carrot', 'broccoli', 'potato', 'asparagus']
veggies.insert(veggies.index('broccoli'), 'celery')
print(veggies)

a.

[‘carrot’, ‘celery’, ‘broccoli’, ‘potato’, ‘asparagus’] Correct 1.00

b.

[‘carrot’, ‘celery’, ‘potato’, ‘asparagus’].

c.

[‘carrot’, ‘broccoli’, ‘celery’, ‘potato’, ‘asparagus’].

d.

[‘celery’, ‘carrot’, ‘broccoli’, ‘potato’, ‘asparagus’].

Posted under Python

Answer: (a).[‘carrot’, ‘celery’, ‘broccoli’, ‘potato’, ‘asparagus’] Correct 1.00

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output?