Python print() Function Presentation


This is the presentation associated with the Python print() function video.

Download Presentation

Python print() Function Video Question

This is the question that was asked in the python print() function video

Question : Change the below code to produce the required output(date should be in single line):
Required Output : "Date:02-07-2021"
In [1]:
day = "07"
month = "02"
year = "2021"

print("Date:")
print(month,day,year, sep = "-")
Date:
02-07-2021
In [1]:
day = "07"
month = "02"
year = "2021"
print("Date:", end = "")
print(month,day,year, sep = "-")
Date:02-07-2021