Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, Im trying to figure out how to get this program to return the appended list of z (using Python), right now its not giving

Hello, Im trying to figure out how to get this program to return the appended list of z (using Python), right now its not giving me any error messages but its not giving me any values either. Please help.

a=[1,2,4,6,8] b=[1,3,4,5,7,9]

def mystery(a,b): x1=len(a) x2=len(b) z=[] end=min(x1,x2)

for p in range(0,end): if a[p] != b[p]: z.append(p) return z print(str(z)) assert z==[1,3,4]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

When will I do them?

Answered: 1 week ago