How To Traverse An Array In Python Code