ty I came to the same conckusion in bed :) now it works.
however since there are 400 students and some are incompatible I shouldnt be able to generate a 200room list right? but it works sometimes the other times i get an error. might be because of recursion depth i never let the error finish. i saw i also generate student 0 which shouldnt exist. and the actual problem is generating all possible combinations right? i mean i can easily generate one list that is made randomly so problem solved. why does one need to generate all possible lists? i guess there are other problems where that might be needed so is this just a bad example or am i missing something? -- http://mail.python.org/mailman/listinfo/python-list