Q. Write a function remove_lowercase() that accepts two file names, and copies all lines that do not start with a lowercase letter from the first file to the second file.
Answer =
def remove_lowercase (infile, outfile):
output = open (outfile, "w")
for line in open (infile):
if not line [0] in "abcdefghijklmnopqrstuvwxyz":
output.write(line)
output.close ()
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )