Answer the question
In order to leave comments, you need to log in
How to implement a check of numbers for proximity?
I need to make sure that each number in the list num is divided by the last number in the list, and then the smallest result is displayed. I tried to implement it but I didn't succeed. Here is my attempt:
num = [10, 2, 8, -7, 3, 7]
rang = len(num) - 1
point = num[5]
del num[5]
way = []
for i in range(rang):
h = point / num.*
way.extend(h)
print(min(way))
Answer the question
In order to leave comments, you need to log in
min(x/num[-1] for x in num[:-1])
But what did you want to achieve. I still don't understand:num.*
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question