In this article, we will learn how to create a text file names as the current date in it. For this, we can use now() method of datetime module.
The datetime module supplies classes for manipulating dates and times in both simple and complex ways. While date and time arithmetic is supported, the focus of the implementation is on efficient attribute extraction for output formatting and manipulation.
Let’s see a code example and try to understand it better.
01 August 2019.txt
- Python | Scramble words from a text file
- Python | Create checkbox using .kv file
- Python program to extract Email-id from URL text file
- Python | Create Box Layout widget using .kv file
- Python | Count occurrences of each word in given text file (Using dictionary)
- Python | Create and write on excel file using xlsxwriter module
- reStructuredText | .rst file to HTML file using Python for Documentations
- Python | Find current weather of any city using openweathermap API
- numpy.empty() in Python
- Python | Pandas DataFrame.empty
- Python | Check whether a list is empty or not
- Python | Check if dictionary is empty
- Python | First Non-Empty String in list
- Python | Pandas TimedeltaIndex.empty
- Python | Convert None to empty string
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.