All pastes #773764 Raw Edit

Stuff

public text v1 · immutable
·published 2007-11-14 19:34 UTC
rendered paste body
#! /usr/bin/python

import random

def list_nb(X,Y):
    Z = []
    for i in range(1,X+1):
        for j in range(1,Y+1):
            Z.append( (i,j) )
    return Z

def list_nb_rand(x, y):
    l = list_nb(x, y)
    random.shuffle( l )
    return l

print list_nb_rand(2, 3)