Python Nested List Comprehension for…in goes from left to right!

The Confusion Scenario: You were asked to write the equivalent list comprehension of the following code: for i in range(6): for j in range(i): j Before, starting with the above one we try the simplest one: t = [] for i in range(6): t.append(i**2) We already know the syntax of list comprehension is as follows: expression…

TIL – How to extract 7z compressed file?

It's pretty simple, in ubuntu you will need a package called: p7zip-full, You can install it from apt using the following command: apt-get install p7zip-full This will enable the 7z command for you. Using that command you can extract the 7z compressed file. For example let's say you have a file my_file.7z. To extract this…

Hello World! – A Brief History of Time

A few days ago, I answered a question on Quora. I thought it worth sharing! Let me walk you through those first few years of my programming career! Its been a lot of fun!When did I Start Programming?I started coding from 2012. It was the year when I enrolled for my Bachelors on Premier University…

Making a Stand Alone Executable from a Python Script using PyInstaller

There are plenty of tools available for converting python script into executable. For example, check out: PyInstallerpy2exe For Python 2, I used to prefer py2exe. It is a neat tool that does the trick by making a stand alone executable from python script. The one problem I faced was, py2exe used to support only python 2! Then I moved on to…

Dreamcatcher IT – The Journey Begins !

Today, I'm pretty excited! In the name of Almighty Allah, we are starting a new venture! Stand up and chase your dreams. Life is meant to be a challenge where we all have to struggle or fight with the things we want to earn. Obstacles, challenges, rough time will come. We will stand strong and overcome…

How to take Password input in Python

Did you know? There is a python module in Python Standard Library called getpass. The purpose of this library is to securely take input from user! The module is very handy for sensitive inputs such as passwords / keys or any kind of credentials. Simplest example of getpass could be this: import getpass password =…

When to use Abstract Class in Python?

In this article, I would like to answer a common question that pops up in mind whenever we start to learn Object Oriented Programming in Python.  But before we begin exploring the use case, first lets briefly discuss about what really is an abstract class in python: Abstract Class Abstract Class is a class that…

Privacy Policy

wasi0013.com ("wasi0013.com" or "we") is dedicated to protecting the privacy rights of our users ("users" or "you").This Online Privacy Policy ("Privacy Policy") has been crafted to inform you as to the ways we collect, store, use, and manage the information you provide in connection with any wasi0013.com game or application ("Service").Please note that the scope…