Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to search for a specific file extension with python

import glob, os
os.chdir("/mydir")
for file in glob.glob("*.txt"):
    print(file)
Comment

PREVIOUS NEXT
Code Example
Python :: Calculate median with pyspark 
Python :: remove all 0 from list python 
Python :: images from opencv displayed in blue 
Python :: discord.py add role on member join 
Python :: discord.py ban 
Python :: password generator python 
Python :: path sum with python 
Python :: discord py bot status 
Python :: import xgboost 
Python :: discord.py make command admin only 
Python :: python split string by tab 
Python :: rotate x label 90 degrees seaborn 
Python :: pandas insert column in the beginning 
Python :: seaborn axis limits 
Python :: put text on image python 
Python :: jupyter notebook dark theme 
Python :: python cv2 screen capture 
Python :: convert seconds to hours python 
Python :: colab cuda version 
Python :: pandas set a column as index 
Python :: size of variable python 
Python :: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123) 
Python :: celsius to fahrenheit in python 
Python :: python sendmessage whatsapp 
Python :: get first of current month python 
Python :: how to locate image using pyautogui 
Python :: unban discord.py 
Python :: python print dict pretty 
Python :: string with comma to int python 
Python :: python import from other folder outside folder 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =