converting an int to a string

Sean Farrow sean.farrow at seanfarrow.co.uk
Fri Jun 8 17:40:41 CEST 2007


Hi: 
I have the folling code:
	def parseTime(self, time):
		minutes =int(float(time)/60)
		seconds =int(float(time)-minutes*60)
		minutes =str(minutes)
		seconds =str(minutes)
the statements that convert the minutes and seconds variables 
str(minutes) and str(seconds) don't seem to be working.
Any idea why?
is there any other way of doing this and perhaps using the $d 
interpolation operator?
sean.



More information about the Python-list mailing list