You are viewing a single comment's thread. Return to all comments →
Thanks , i modified your code and i was able to get the answer
def countApplesAndOranges(s, t, a, b, apples, oranges): apple2 = list(apples) orange2 = list(oranges) count_apple =0 count_orange =0 for i in apple2: if s <= (a+i)<=t: count_apple +=1 for j in orange2: if s <= (b+j) <= t: count_orange +=1 print(count_apple) print(count_orange)
Apple and Orange
You are viewing a single comment's thread. Return to all comments →
Thanks , i modified your code and i was able to get the answer