def find_averages_of_subarrays_pythonic(arr: list[int], K: int) -> list[float]:
    """

    Args:
        arr: input array
        K: subarray (window) size

    Returns:
        average of all K-length subarrays

    Examples:
        >>> find_averages_of_subarrays_pythonic([1, 3, 2, 6, -1, 4, 1, 8, 2],5)
        [2.2, 2.8, 2.4, 3.6, 2.8]
        >>> find_averages_of_subarrays_pythonic([],5)
        []
        >>> find_averages_of_subarrays_pythonic([1],0)
        []

    """

    ## EDGE CASES ##
    default_ret_val = []
    if not arr:
        return default_ret_val
    if K <= 0:
        return default_ret_val

    """ALGORITHM """
    ## INITIALIZE VARS ##

    window_start, window_end = 0, K - 1
    window_sum = float(sum(arr[window_start:window_end]))

    # DS's/res
    res = []

    ## SLIDING
    for window_end in range(window_end, len(arr)):
        ## EXPANSION
        window_sum += arr[window_end]  # handle_window_expansion_at_end
        ## WINDOW MATCH
        res.append(window_sum / K)  # handle_window_match
        ## CONTRACTION
        window_sum -= arr[window_start]  # handle_window_contraction_at_beginning
        window_start += 1
    return res