Il 14 ottobre 2009 11.22, Marco Beri <marcob...@gmail.com> ha scritto:
> date.rsplit(".")

Perfetto!

Ecco quindi i due modi:

1°
data=str(time.time())
print data[0:-3]

2°
print str (time.time() ).rsplit(".")[0]

Il secondo metodo è secondo me da preferire perchè, leggengo sotto, mi
sembra di capire che NON sempre ci sono due cifre decimali.

>>> import time
>>> help(time.time)
...
   Return the current time in seconds since the Epoch.
   Fractions of a second may be present if the system clock provides them.
_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a