Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python check if file has content
Mary Smith
Programming language:
Python
2021-07-21 11:51:29
0
Q:
python check if file has content
villasv
Code:
Python
2021-07-16 15:50:02
>>> import os >>> os.stat("file").st_size == 0 True
1
Tags
python
file
check
con
Related
python check file extension
python how to see if file is directory
how to know how much lines a file has using python
python check if file exists
how to check whether file exists in python
how to check if file exists pyuthon
python os if file exists
python create file if doesbt exist
file exist python
python create file if not exists
how to get what type of file a file is in python
how to check if a string is in a file python
how to check if a file exists in python
how to check the size of a file in python
python check if a file is empty
New to Communities?
Join the community