p
y
c
h
a
l
l
e
n
g
e
r
Home
Intermediate Python
Datetime
Exercise: Reformat a date string
Exercise: Reformat a date string
First parse
'2024-12-25'
into a datetime, then format it back out as
'25-Dec-2024'
.
Premium
reset
def greet(name): return f"Hello, {name}!" print(greet("Erik"))
Python
Setting up Python environment...
Output