Skip to the content.
Home | Blog | Book Reading |About | All Courses

Adding sequential numbers to a file

Using Vim is like magic !!! I had a file with about 300 lines of rows. I wanted to number each row from 1 to the last number This is a sample csv file that represents the file that I was working with. Name,City Abcd,Bangalore Pqr,London... [Read More]

Undo local changes in a Git Repository

I cloned a Git Repository and started doing some changes. After working for sometime, I realised that the solution I was trying would never work. I wanted to try another approach. To do this, I wanted to first undo the changes I had with the bad solution. So that I... [Read More]

Swapping dictionary keys and values

Schools were (and some are still) notorious for building a sense of competition in children through their “ranking” system. The one who writes the most number of correct answers ( irrespective of how much that student understood it ) always gets a better rank than someone who just could not... [Read More]

Which is your favourite fruit?

A Supermarket opened up next to a school. They wanted to conduct a survey to check which fruits children like to eat the most. They go to their school and ask each one to write down their favourite fruit. Let’s assume that this is the list that they got by... [Read More]

Why should index start from 0?

When you count the number of chairs in a room, you start counting from 1 When you count the number of people ahead of you in a queue, you start counting from 1 Almost all things we count in real life, we start counting from 1. Then why... [Read More]