logo

Crowdly

What will be the output after running the following code? def func(mylist): ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What will be the output after running the following code?

def func(mylist):

    mylist[3]="strawberries"

lst = ["bananas","apples","pears","peas"]

func(lst)

print(lst)

A. ['bananas', 'apples', 'strawberries', 'peas']

B. ['bananas', 'apples', 'pears', 'strawberries']

C. ['bananas', 'apples', 'strawberries']

D. ['strawberries', 'strawberries', 'strawberries']

More questions like this

Want instant access to all verified answers on moodle.ulsachihuahua.edu.mx?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!