Trapping Rainwater
Given an array height where each value represents an elevation bar of width 1, return the total volume of water that can be trapped after raining. Implement trap(height), accepting a list of non-negative integers and returning an integer. Water above an index is limited by the shorter maximum bar on its left and right.
def trap(height):