Hello,
I have this code
#!/usr/bin/env python
import csv
import random
alpha = 'abcdefghijklmnopqrstuvwxyz'
e = range(0,99)
x = random.sample(alpha,14)
c = csv.writer(open("test2.csv", "wb"))
c.writerow([x])
cr = csv.reader(open("test2.csv","rb"))
for row in cr:
print ', '.join(row)
print "How many rows?"
l = input()
k = 1
while k < int(l):
y = random.sample(e,14)
c.writerow([y])
cr = csv.reader(open("test2.csv","rb"))
for row in cr:
print ','.join(row)
k += 1
print "done"
which produces (when l is set to 6):
"['y', 'g', 'v', 'f', 'd', 'c', 'h', 's', 'm', 'p', 'j', 't', 'x', 'e']"
"[79, 55, 74, 70, 73, 80, 69, 57, 83, 9, 50, 87, 37, 5]"
"[2, 90, 69, 40, 27, 30, 55, 80, 42, 12, 51, 44, 83, 16]"
"[9, 35, 56, 96, 76, 29, 44, 68, 95, 33, 97, 67, 15, 39]"
"[86, 48, 29, 98, 81, 24, 79, 69, 82, 18, 77, 27, 12, 94]"
"[74, 29, 75, 81, 0, 20, 87, 71, 2, 36, 5, 64, 61, 9]"
is there anyway to get rid of all the brackets and quotation marks?