Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from datetime import date
- import re
- def main():
- birth_date = input('Date of Birth: ')
- print(check(birth_date))
- def check(birth_date):
- if re.search(r"^[0-9]{4}-[0-9]{2}-[0-9]{2}$", birth_date):
- year, month, day = birth_date.split("-")
- return day + "/" + month + "/" + year
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment