How to view uncomment lines in a file using python

Here we are taking the configuration file of Jupyter network.

uncomment = open('jupyter_notebook_config.py')

for line in uncomment:
    if line[0] != '#':

        print(line)
        
uncomment.close
c.NotebookApp.allow_credentials = False

c.NotebookApp.port = 8889

c.NotebookApp.password_required = True

Post navigation

Leave a Reply