Corvus Energy interview question

Leetcode easy question in Python and also reading/explaining YAML scripts