Sunday, 22 January 2023

Python - File Operations

#FILE READ

 
welcome1 Python is a great language. Yeah its great!! Name of the file: sample.txt Closed or not : True Opening mode : r

 

# FILE WRITE
#!/usr/bin/python
# Open a file


fo = open("sample.txt", "w")
fo.write( "welcome1 Python is a great language.\nYeah its great!!\n")


# Close opend file

fo.close() 

No comments:

Data Sharing

  1. Create Share CREATE SHARE my_share; 2. Grant privileges to share GRANT USAGE ON DATABASE my_db TO SHARE my_share; GRANT USAGE ...