Pylenin Weekly #8

Ending the week with the python loops concept, some youtube comments of the week, and a masterclass on Git.

Pylenin Weekly #8

Hello peeps,

Welcome to Pylenin Weekly #8, a newsletter dedicated to improving the lives of my fellow peers through knowledge sharing. This week, I have focused on finishing some of the important articles related to loops in Python.

While loops

Learn to perform iterations until a condition holds True in Python using while loops with examples.

Python While loops (With Examples)
Learn to perform iterations until a condition holds True in Python using while loops with examples.

break, continue and pass

Learn to use break, continue and pass statements inside loops in Python with examples.

Python break, continue and pass (With examples)
Learn to use break, continue and pass statements inside loops in Python with examples.

"The whole process wasn't very clear to me after reading AWS doc. The video demonstrated that in a very simple way. It helped me a lot- Thank you!"

The above comment was given by one of my followers in the AWS Lambda deployment package video. Arguably, one of the most popular videos I have created on Youtube!. You can check out the video here.

"Thank you, your explanation was clear. I like how you structured this!"

The above comment was posted on Python Class and Class Attributes video. Even though I never use Object Oriented Programming language, it was fun to learn the concept and talk about it. You can check out the video here.


Top git commands for developers

A lot of you must be already working with Git. So I decided to share some git commands that I use regularly. Let me know which ones you don't use by throwing me a tweet!

git config

Configures a directory with the name and email address that will be used with your commits.

# Name
git config --global user.name "<Your-Full-Name>"

# email
git config --global user.email "<your-email-address>"

git init

Use this command to create a new git repository. It handles the initial setup necessary to deal with git.

git clone

To start working on any project that is available on Github or Gitlab, you need to clone it first to your local environment. Use the above command and pass the repository URL as the argument.

git clone https://github.com/<repo-url>

git status

Which files to add to staging, which files are untracked and which files are ready to commit, you can get information for all the above states through the git status command. I use this very frequently.

git add

To add files to staging and get them ready for commit, use this command.

To add all the files, use git add ..
To add a single file, use git add <filename>

git commit

When you are sure of your changes, you will commit your changes with a log message.

git commit -m "<log message>"

git push

To push your content from local to a remote repository, use this command. This will create a Pull Request.

git checkout

To switch to a different working branch or create a new working branch, I use this command.

To create and switch to a new branch - git checkout -b <branch-name>.
To only switch to an existing branch - git checkout <branch-name>.

git pull

If multiple people are working on a project, you would want to update your local repository with the changes introduced by your colleagues. To fetch and integrate those changes to your local repository, use this command.


I hope you learned something today from this newsletter! if you enjoy this newsletter, share it with your friends, family, and colleagues and ask them to subscribe!

See you again next week!