Find highly composite number using Python 3
As you said, the naming is not good and the code can be condensed and optimized.


You don't need to keep all the lists, you just need the count
You can split get_divisors so you have another function to get the divisors of a single number
You can use a dictionary to store the divisor count of the numbers.


This would already take care of the variable names:

def get_divisors_count(number):
  divisors = []
  for divisor in range(1, number + 1):
    if (number % divisor) == 0:
      divisors.append(divisor)
  return len(divisors)

def get_divisors_range(number_range):
  divisor_count = {}
  for number in range(1, number_range):
    divisor_count[number] = get_divisors_count(number)
  return divisor_count

def get_highly_composite_number(number_range):
  divisor_list = get_divisors_range(number_range)
  highly_composite_number_list = []
  for i in range(number_range - 1, 0, -1):
    found = False
    for j in range(1, i):
      if (divisor_list[j] &gt;= divisor_list[i]):
        found = True
        break
    if (not found):
      #If you want the list sorted from low to high
      #change this to highly_composite_number_list.insert(0, i)
      highly_composite_number_list.append(i)
  return highly_composite_number_list



This could also be optimized a bit using a lookup for numbers of which you already computed the divisors. For examples, 4 is a divisor of 8, but when you check 8, you can lookup the divisors of 4 and use that.