xxxxxxxxxx
import os
if not os.path.exists('my_folder'):
os.makedirs('my_folder')
xxxxxxxxxx
# importing os module
import os
# Specify path
path = '/usr/local/bin/'
# Check if the path exists
isExist = os.path.exists(path)
print(isExist)
OUTPUT:
True #if path exist
False #if path doesn't exist
xxxxxxxxxx
//hello_world.txt contains the characters: “Hello, world!!”
$handle =fopen(“hello_world.txt”, “r”);
fseek($handle, 7);
echo fread($handle, 5);
fclose($handle)
xxxxxxxxxx
//hello_world.txt contains the characters: “Hello, world!!”
$handle =fopen(“hello_world.txt”, “r”);
fseek($handle, 7);
echo fread($handle, 5);
fclose($handle)