Created
September 9, 2020 22:22
-
-
Save aliyevorkhan/b1e0eceec3542e174bb3826949c33214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
for file in os.listdir(os.getcwd()): | |
if file.endswith('.txt'): | |
os.remove(file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this script is able to remove .txt files in current directory