Remove lines starting with “#” with reggular expression in python in a string

前端 未结 0 714
醉话见心
醉话见心 2020-11-30 22:03

Remove all one-line comments, a comment which starts and ends on one line

Example

Input:
# This is a comment
print(\'remove_comments\')

Output:
print(         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题