Question: 6 . ( 5 0 pt ) Write a Python program comm rm . py to remove all comments from a Python program. The program
pt Write a Python program comm rmpy to remove all comments from a Python program. The
program should work as follows:
python commrmpy inputfile.py
where inputfile.py is any correct Python program. The program with comments removed will
be saved in the file inputfilermpy
You are not allowed to use the regular expression capabilities of Python, as that would defeat the
purpose of the question.
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
