Select Page

Python Notes

Exception handling try:   # Do something except Exception as e:   # Handle it Print array of strings print “”\n””.join(arr) Iterating by index for i in range(len(arr)):   print arr[i] Passing CLI arguments import sys print(sys.argv[0]) Using...

Git Tips: Default the main branch

Branch on new git repo locally The default branch for git is set to master. You can change that behavior by changing a global setting for the default branch. This will help keep the main branch as the default for newly created repositories. git config –global...

Dotfiles

tl;dr GitHub repo with latest dotfiles: https://github.com/pranavcode/dotfiles.git Clone the dotfiles locally Ideally, clone it into the user’s home directory. git clone [https://github.com/pranavcode/dotfiles.git](https://github.com/pranavcode/dotfiles.git) Install...