Hello,

times  =  ['50.319468', '50.319468', 't1']

I want to convert  [0:2] to floats.

I tried:

float.times = [float(i) for i in times[:2]]

but get the error msg:

TypeError: can't set attributes of built-in/extension type 'float'

Carmel
-- 

-- 
Carmel O'Shannessy, Assoc. Prof.
Department of Linguistics
University of Michigan
440 Lorch Hall
611 Tappan Street
Ann Arbor, MI, 48109-1220
Ph:   +1 734 764 0353
Fax: +1 734 936 3406
http://www-personal.umich.edu/~carmelos/
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to