![]() |
Python time method time.asctime() is used to convert a tuple or a time.struct_time object representing a time as returned by time.gmtime() or time.localtime() method to a string of the following form: Day Mon Date Hour:Min:Sec Year For example: Thu 08 22 10:46:56 2019 Python time asctime() Syntax:
Python time asctime() Parameter:
Python time asctime() Return type:
Example of Python time asctime()Example 1: Use of time.asctime() methodPython3
Output:
Example 2: If the parameter ‘t’ is not providedPython3
Output: Thu Oct 7 21:01:45 2021 Example 3: If the parameter ‘t’ is a tuplePython3
Output: Thu Aug 22 11:21:48 2019 |
Reffered: https://www.geeksforgeeks.org
Python |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 9 |