Comparing two cubes sizes and re arranging

Hi i am trying to compare scales of two cubes but that code is not working

import bpy
from random import randint
bpy.ops.mesh.primitive_cube_add()

#how many cubes you want to add
count = 2

for c in range(0,count):
x = randint(-10,10)
y = randint(-10,10)
z = randint(-10,10)
bpy.ops.mesh.primitive_cube_add(location=(x,y,z))
bpy.data.objects
cube1=bpy.data.objects[‘Cube’].scale
cube2=bpy.data.objects[‘Cube.001’].scale
if cube1 cube2
bpy.data.objects[‘Cube’].location.x+=4

You are missing a comparison operator in your last if statement, Also, you are never setting scale for the new cubes, so they would both have the same, default scale.