This is the presentation associated with the Python print() function video.
[dflip id=”1619″ ][/dflip]
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 = "-")
[bg_collapse view=”button-blue” color=”#ffffff” icon=”eye” expand_text=”Show Answer” collapse_text=”Hide Answer” ]
In [1]:
day = "07"
month = "02"
year = "2021"
print("Date:", end = "")
print(month,day,year, sep = "-")
[/bg_collapse]