Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
# Hello World program in Python
#def calc_sum() :
# a = 3
# b = 4
# c = 5
# a = int(input())
# b = int(input())
# c = int(input())
# print ('Sum is:', a + b + c)
#print ("Hello World!");
#
#calc_sum ()
def process_file (infile,outfile):
f_in=open(infile,"r+")
str=f_in.read()
print ("Read String is : ", str)
# Close opened file
f_in.close()
f_out=open(outfile,"w")
f_out.write("new w+ file\n"+str)
f_out.close()
process_file('infile.txt','outfile.txt')
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more