Hey:)
It is very easy to get the file type using os
you can get it by the following code snippet
import os
if os.path.isdir(file_dr):
file = "folder"
else:
file_ = name.split(".")
file = repr(file_[-1])
print(file")
Hey:)
It is very easy to get the file type using os
you can get it by the following code snippet
import os
if os.path.isdir(file_dr):
file = "folder"
else:
file_ = name.split(".")
file = repr(file_[-1])
print(file")
For further actions, you may consider blocking this person and/or reporting abuse
kit2d2 -
Alex Merced -
Asim khan -
Dan Mugisho M. -
Top comments (0)