os.path.exists ব্যবহার করে অস্তিত্ব যাচাই
import os
if not os.path.exists('my_folder'):
print("Given path doesn't exist")
else:
print("Given path exists")
আউটপুট (যদি ফোল্ডার থাকে)
"Given path exists"
os.path.exists() ফাইল এবং ডিরেক্টরি দুটির জন্যই True ফেরত দেয় যদি পথটি অস্তিত্বে থাকে।