Cses Problem Set Array Method In Python Class