
def move_zeros(array):
    if len(array) < 1:
        return array
    else:
        list = []
        zeros = 0

        for i in array:
            if not i and type(i) is int or type(i) is float:
                zeros += 1
            else:
                list.append(i)

    for i in range(0, zeros):
        list.append(0)

    return list


def move_zeros(array):
    result = []
    zeros = 0

    for i in array:
        if not i and type(i) is int or type(i) is float:
            zeros += 1
        else:
            result.append(i)

for i in range(0, zeros):
    result.append(0)

return result

Change the variable name for clarity
Change the variable name for clarity
  
  def move_zeros(array):
+     result = []
-     if len(array) < 1:
-         return array
-     else:
-         list = []
-         zeros = 0
+     zeros = 0
  
-         for i in array:
+     for i in array:
-             if not i and type(i) is int or type(i) is float:
+         if not i and type(i) is int or type(i) is float:
-                 zeros += 1
+             zeros += 1
-             else:
+         else:
-                 list.append(i)
+             result.append(i)
  
-     for i in range(0, zeros):
+ for i in range(0, zeros):
-         list.append(0)
+     result.append(0)
  
-     return list
+ return result
  
Change the variable name for clarity
## Code Before:

def move_zeros(array):
    if len(array) < 1:
        return array
    else:
        list = []
        zeros = 0

        for i in array:
            if not i and type(i) is int or type(i) is float:
                zeros += 1
            else:
                list.append(i)

    for i in range(0, zeros):
        list.append(0)

    return list

## Instruction:
Change the variable name for clarity
## Code After:

def move_zeros(array):
    result = []
    zeros = 0

    for i in array:
        if not i and type(i) is int or type(i) is float:
            zeros += 1
        else:
            result.append(i)

for i in range(0, zeros):
    result.append(0)

return result
