Learning Python Week 9 — Time for Refactoring

  1. Block comment/uncomment — CTRL + / as documented here. I also found a cheatsheet of Jupyter notebook keyboard shortcuts here
  2. I wanted to know how to save my Jupyter notebook file as python script and found a tip here. This is so cool — then, I opened the saved python file in Visual Studio Code as it supports Jupyter notebooks — Now I have one more reason to like VS Code as I am still deciding what general-purpose code editor I should settle on — Atom, Brackets or VS Code.
  3. But then I found a very useful pointer in the first comment in the above SO post — save the notebook automatically as .py file each time the notebook is saved using a post-save hook — this approach is way too cool.The steps I followed are mentioned here in this answer
  4. Even when using Jupyter, I was using # to comment my code as I was not sure how markdowns would work when I copy and paste my code into .py file. Now, with the above tip to save the notebook automatically as a .py file, the markdowns are automatically converted into comments with # as prefix. Now, I can start using markdowns a lot more :)

An entrepreneur who is coming back to coding after a gap of 16 years due to love of coding.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

【 o8.o5 to o8.11 | Gate o7 - The Key of Guidance 】

Make GitHub Your Own CMS Using Hugo

Zoom Webinar Alternatives for Virtual Events

Mastodon Systemic Sustainability

How To Pass A Coding Interview As An Automation Developer

Image optimisation service for Netlify CMS and Nuxt

The Sims 4 Modern Python Modding: Debugging

Automating PageSpeed Tests with Python & Google PageSpeed Insights API

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Siraj Samsudeen

Siraj Samsudeen

An entrepreneur who is coming back to coding after a gap of 16 years due to love of coding.

More from Medium

do you need to have services for DDoS protection filter list ?

Recode data in Python

Learning Phyton-Assignment

Python practice: Q1. Guess a number