ah solved it now by reversing the variables.
but lets say you have a function where you dont know before hand, how would you solve that?
edit: changed variablename too.
take a look at http://arcfn.com/doc/iteration.html for a list of different iteration functions. since you aren't using the x variable in those for loops there, you could just use repeat: