Report Bug

Qus

What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)?

import datetime

  tday=datetime.date.today() 

print(tday)

Qus18 जून, 2017 (रविवार) को सिस्टम की तारीख के बाद निम्न पायथन कोड का आउटपुट क्या होगा?


A. 18-06-2017
B. 06-18-2017
C. 2017-06-18
D. Error


Solution
C. 2017-06-18



Explanation
The code shown above prints the system date in the format yyyy-mm-dd. Hence the output of this code is: 2017-06-18.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad