Question: filenames = [ program . c , stdio.hpp , sample.hpp , a . out, math.hpp , hpp .
filenames programc "stdio.hpp "sample.hppaout", "math.hpphppout"
# Generate newfilenames as a list containing the new filenames
# using as many lines of code as your chosen method requires.
newfilenames
for filename in filenames:
if filename.endswithhpp:
else:
printnewfilenames
# Should be programc "stdio.h "sample.haout", "math.hhppout"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
