Originally published: 2006-02-07 16:18:19
Last updated: 2006-02-07 16:18:19
Author: Stephen Chappell
There aren't many one-liner programs that exist, and that is probably a good thing. This recipe is designed to remove all comments from Python code where the comment is the only thing that is on a line of your program. This can be useful when just trying to get a summary of the code, especially if the comments are heavily used for documentation. Please take note of the program that this recipe has (listed below).