Can you let me know in case I would like to put a check condition for a file, in case the file is not available it should print "file is not available, please upload the file". How can I do this?
To print the message that file is not found, use try-except block.
Refer below sample code.
except OSError as e:
print("File " + filename + "is not available, please upload the file.")
For Python 3, try doing this:
import urllib.request, ...READ MORE
Hi. Good question! Well, just like what ...READ MORE
if cookie and not cookie.isspace():
# the ...READ MORE
In python objects/variables are wrapped into methods ...READ MORE
if you google it you can find. ...READ MORE
suppose you have a list
a = [0,1,2,3,4,5,6,7,8,9,10]
now ...READ MORE
can you give an example using a ...READ MORE
You can simply the built-in function in ...READ MORE
The right datatype for destination in argpasrse module ...READ MORE
You use os.walk() module of python for ...READ MORE