What will be the output of the following Python code? [code]import time time.asctime()[/code]

What will be the output of the following Python code?
Code:
import time
time.asctime()
A. Current date only
B. UTC time
C. Current date and time
D. Current time only
 
Answer: c
Explanation: The function time.asctime(), present if the time module can be used to return the current date and time. It can also accept a parameter and return the date and time in a particular format. However in the above code, since we have not passed any parameters in the above code, the current date and time is returned.
 

Tìm kiếm

Back
Top