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
Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.
Spacelift team -
Mark Laszlo -
Ibrohim Abdivokhidov -
Md Sujauddin Sekh -
Top comments (0)