tuple to string/list
WIWA
wim_wauters at skynet.be
Thu Aug 21 15:41:27 EDT 2003
Hi,
I'm a newbie learning to appreciate the strength of Python. I'm
writing an application to look at the access_log of my apache server:
When I write:
for i in range(len(month)):
output="Hits for",month[i], ":" , teller[i]
f.write(str(output))
f.close()
=> this produces a tuple:
('Hits for', 'Jan', ':', 0)('Hits for', 'Feb', ':', 2)('Hits for',
'Mar', ':', 3)
=> whereas I would like the following output:
Hits for Jan: 0
Hits for Feb: 2
Hits for Mar: 3
Any easy way of obtaing this output?
Thanks in advance,
Wim
More information about the Python-list
mailing list