Problem 198649 · easy · Level 01 Prerequisites & Setup

Reorder a Date

strings · split · slicing · join

A database stores dates as YYYY-MM-DD, but the invoice template wants DD/MM/YYYY. Given a string iso in the first format, return it in the second.

Examples

Input:  iso = "2024-03-15"
Output: "15/03/2024"

Input:  iso = "1999-12-31"
Output: "31/12/1999"

Constraints

  • iso always has the form YYYY-MM-DD with exactly 4, 2 and 2 digits

Goals

  • Split a string on a separator
  • Rearrange the pieces and join them with a different separator
Starting Python…