Skip to content

Instantly share code, notes, and snippets.

@enigma
Created May 17, 2010 16:29
Show Gist options
  • Save enigma/403949 to your computer and use it in GitHub Desktop.
Save enigma/403949 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# Usage: python test_generator.py <number_of_tests> <length_of_tests>
import sys
import random
n, length = [int(i) for i in sys.argv[-2:]]
Lst = range(1, length+1)
lst = [str(i) for i in Lst]
print n
for x in xrange(n):
random.shuffle(lst)
print length
print ' '.join(lst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment