Advanced printing - sep

So far, we’ve used print() statements with different arguments, and the program printed those separated by a space. print('abc', 'def', 2) would result in abc def 2.
What if we want to separate the values with a * instead of a space. This is possible by providing a sep parameter to print().
print('hello', 'my', 'name is', 'Python', sep='*')
This program would print hello*my*name is*Python. sep can be any textual value. It can be a phrase (this is a separation, hey hey, etc), it can consist of symbols, and it can even be an empty text sep=''. In the case of an empty text, print would output the values concatenated to each other.
print('hello', 'my', 'name is', 'Python', sep='')
dash = '--'
print('hello', 'my', 'name is', 'Python', sep=dash)
This would result in:
hellomyname isPython
hello--my--name is--Python
So, by default, the sep parameter is set to be a space (' ') and separates the printed values with a single space, but we can modify the output format by passing our desired value to the print function with print(..., sep='...').

Challenge

You are given 3 inputs - a year, a month, and a day. You need to output the date in the format year-month-day.
Input
Output
2022 05 10
2022-05-10
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue