Wydrukuj aktualne godziny i minuty w Pythonie
import datetime
currentime = datetime.datetime.now()
time = currentime.strftime('%H:%M')
print(time)
Lovely Lion
import datetime
currentime = datetime.datetime.now()
time = currentime.strftime('%H:%M')
print(time)
import datetime
currentime = datetime.datetime.now()
hours = currentime.strftime('%H')
minutes = currentime.strftime('%M')
seconds = currentime.strftime('%S')
mixed = currentime.strftime('%H:%M:%S')