@@ -0,0 +1,980 @@
+def move_cars(current, final):%0A    if len(current) %3C= 1:%0A        return 0%0A    if len(current) == 2 and current%5B0%5D == final%5B0%5D:%0A        return 0%0A%0A    moves = 0%0A    for i, car in enumerate(current):%0A        if car == final%5Bi%5D:%0A            if car == '_':%0A                # need to move car to this spot first%0A                moves += 1%0A        else:%0A            moves += 1%0A    # if there are two spots, only needs 1 move not 2 moves%0A    return moves - 1%0A%0A%0Aif __name__ == '__main__':%0A    current = %5B'A', 'B', 'C', '_'%5D%0A    final = %5B'_', 'B', 'A', 'C'%5D%0A    print(move_cars(current, final)) # 2%0A%0A    current = %5B'A', 'B', '_'%5D%0A    final = %5B'B', 'A', '_'%5D%0A    print(move_cars(current, final)) # 2%0A%0A    current = %5B'A', '_', 'B', 'C'%5D%0A    final = %5B'B', '_', 'C', 'A'%5D%0A    print(move_cars(current, final)) # 3%0A%0A    current = %5B'A', '_'%5D%0A    final = %5B'_', 'A'%5D%0A    print(move_cars(current, final)) # 1%0A%0A    current = %5B'_', 'A'%5D%0A    final = %5B'_', 'A'%5D%0A    print(move_cars(current, final)) # 0%0A%0A

Create A_parking_lot.py