Friday, December 25, 2020

python day 18 files

 # -*- coding: utf-8 -*-

"""

Created on Sat Dec 26 07:42:27 2020

 topic: files

@author: anil



f = open("file1.txt")

print(f)



f = open("file1.txt")

print(type(f))


f = open("day_17.py",'r')

print(f.read())


import os


f = open("day_17.py",'r')

print(f.read())




f = open("file1.txt", "r")

print(f.read(15))


f = open("file1.txt", "r")

print(f.readline())

f.close()


f = open("file1.txt", "r")

print(f.readline())

f.close()







f = open("file1.txt", "r")

print(f.read())


f = open("file1.txt", "a")

f.write("\nPraveen is thopu!!!!")


f = open("file1.txt", "r")

print(f.read())




f.close()



f = open("file1.txt", "r")

print(f.read())


f = open("file1.txt", "a")

f.write("\nPraveen is thopu!!!!")


f = open("file1.txt", "r")

print(f.read())






f = open("file5.txt", "a")

f.write("\nPraveen is thurum!!!!")

f = open("file5.txt", "a")

f.write("\nPraveen is thopu!!!!")


f = open("file5.txt", "r")

print(f.read())

f.close()



import os

os.remove("file5.txt")

"""

import os


file = "a.mp3"

os.system(file)


No comments:

Post a Comment

python class topic video