Latest web development tutorials

Python incluye ejercicios 91

Python 100 Li Python 100 Li

Título: Funciones de tiempo Ejemplo 1.

Análisis del programa: Ninguno.

Código fuente:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

if __name__ == '__main__':
    import time
    print time.ctime(time.time())
    print time.asctime(time.localtime(time.time()))
    print time.asctime(time.gmtime(time.time()))

La salida del ejemplo anterior es:

Wed Oct 21 17:08:51 2015
Wed Oct 21 17:08:51 2015
Wed Oct 21 09:08:51 2015

Python 100 Li Python 100 Li