jeudi 16 juin 2016

Specify input() type in Python?


I'm still learning so please forgive if this sounds like a dumb question. Is it possible to define input times, like time, date, currency or that should be verified manually? Like for example:

morning = input('Enter morning Time:')
evening = input('Enter evening Time:')

.. I need (only) time here, how do I make sure that user enters input in xx:xx format where xx are integers only.

Many thanks


Aucun commentaire:

Enregistrer un commentaire