#Writing Program
fp=open("Student.txt","w")
for i in range(3):
    #name=input("enter your friends name")
    #fp.write(name)
    fp.write(input("Enter your friends name"))
    fp.write('\n')

fp.close()
fp=open("Student.txt","r")
str1=fp.read()
print("Data from Student.txt")
print(str1)
fp.close()
'''
Enter your friends namesarvani
Enter your friends namevyshnavi
Enter your friends namesharon
Data from Student.txt
sarvani
vyshnavi
sharon
'''

f91e8729616783adae696332f1b8554d25006379
<mask token>

<mask token>
for i in range(3):
    fp.write(input('Enter your friends name'))
    fp.write('\n')
fp.close()
<mask token>
print('Data from Student.txt')
print(str1)
fp.close()
<mask token>

fp = open('Student.txt', 'w')
for i in range(3):
    fp.write(input('Enter your friends name'))
    fp.write('\n')
fp.close()
fp = open('Student.txt', 'r')
str1 = fp.read()
print('Data from Student.txt')
print(str1)
fp.close()
<mask token>

#Writing Program
fp=open("Student.txt","w")
for i in range(3):
    #name=input("enter your friends name")
    #fp.write(name)
    fp.write(input("Enter your friends name"))
    fp.write('\n')

fp.close()
fp=open("Student.txt","r")
str1=fp.read()
print("Data from Student.txt")
print(str1)
fp.close()
'''
Enter your friends namesarvani
Enter your friends namevyshnavi
Enter your friends namesharon
Data from Student.txt
sarvani
vyshnavi
sharon
'''
