Just a guess, not sure if it really works:
You could name your layouts using numbers (1,2,3...) and proceed to the next layout using the str(currentLayout++) function, where currentLayout is a global variable (integer).
Or you use the array and fill it with all the names of your layouts, then just iterate through the array...