Export data from python to a txt file
__peter__ at web.de
Fri Mar 29 19:11:01 CET 2013
Ana Dionísio wrote:
> I have this lists a=[1,3,5,6,10], b=[a,t,q,r,s] and I need to export it to
> a txt file and I can't use csv.
What do you mean by "can't use csv"?
- You cannot get it to work with the csv module
- You are not allowed to use csv by your instructor
- Something else.
> And I want the next format:
> a 1 3 5 6 10
> b a t q r s
> I already have this code:
> "f = open("test.txt", 'w')
> for i in xrange(len(a)):
> But it doesn't have the format I want. Can you help?
More information about the Python-list