Meta interview question

Basic Python leetcode question asking for array manipulation