76 337
Assignments Done
Successfully Done
In May 2019

Answer to Question #3393 in Python for mukunda

Question #3393
Write a program to open a text file which contains two strings, i.e. your first name and last name, read those names and concatenate them and print in a text called fullname.txt. (Note concatenating strings example string1 + string2 if they are of two strings)
Expert's answer
fin = open ("twostrings.txt")
firstname, lastname = fin.readline()[:-1], fin.readline()

fout = open ("fullname.txt", "w")
fout.write(firstname + " " + lastname)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions