A list z of length len(y)/2 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

A list z of length len(y)/2

The function takes in input a list of numbers y of even length, and returns a list z of length len(y)/2, such that: • z[i] = True if y[-i] < y[i] • z[i] = False otherwise

12th Nov 2018, 3:04 PM
Earl
3 Answers
+ 5
you've finished it, haven't you? z = [ True if y[-i]<y[i] else False for i in range(len(y)/2) ]
12th Nov 2018, 6:43 PM
Flandre Scarlet
Flandre Scarlet - avatar
0
Give an example of what you want
12th Nov 2018, 3:21 PM
Dlite
Dlite - avatar
0
i do not have an example
12th Nov 2018, 4:12 PM
Earl