I have a numpy array like this:
n= [['20015' '20013' '20044' '20001' '20002']
['20002' '20015' '20001' '20013' '20070']
['20044' '20013' '20015' '20001' '20002']
['20071' '20015' '20070' '20001' '20002']]
I wish to print this list into a file in the form of :
20015, 20013, 20044, 20001, 20002
20002, 20015, 20001, 20013, 20070
How can I get rid of the list of list but still keep the grouped 5 together: I tried this out:
f=open("myfile.txt, "w")
n=clf.classes_[order[:, -5:]]
print(n)
str1=''.join(str(x) for x in n)
print>>f, str1
f.close()
But this again puts them in a list.