“Relógio Python” Respostas de código

Relógio Python

# Here is a self updating clock function, just run it and it'll self update itself until you hit CTRL-C
import datetime
import time
def clock():
    while True:
        print(datetime.datetime.now().strftime("%H:%M:%S"), end="\r")
        time.sleep(1)

clock()
Random boi

Biblioteca Python Time

#also see datetime
import time
now = time.time()
print(now)
Dr. Hippo

Respostas semelhantes a “Relógio Python”

Perguntas semelhantes a “Relógio Python”

Mais respostas relacionadas para “Relógio Python” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código