What I learned new this week (week 4)


Before beginning with it I should clearify first why am I writing this. Every day we learn something, specially me because I recently started using Linux for fulltime. So I am learning something every day about it. But I find out that I forget most of it because I do not write it down. So I start writing it down. Also I thought that I should share this with everyone. And this is the third week. There might be some information which is new to you. So let’s get started.

Small Disclaimer:- it is not a typical blog post where we deeply discuss about something. Here I will provide only a small brief about lots of thing.

  1. In Python, to remove suffix from a string use .removesuffix() method and pass the suffix which you want to remove as a argument to .removesuffix() method.

  2. In Python, to convert an normal list into a numpy array use numpy.array(my_list). I knew this but my memory is more volatile than a RAM.

  3. In Linux, !! stores the last executed command. This can also be used to add suffix or prefix to the last command. example:- if you entered apt update command in the terminal and forgot to add sudo privillage, you can enter sudo !!. It will result in sudo apt update. Again this can be used to add commands at the end of previous command by doing this !! new_command.

  4. In Vim, ctrl-r is the keymap for redo. I have been using vim for a long time but I just learn this today.

  5. In Vim, >> will indent the current line and << will unindent the current line.

  6. In Linux, instead of using clear command to clear the terminal we can use ctrl+l to clear the terminal.

  7. In Linux Terminal, if we enter the command !$ it will echo and execute the last executed command.

  8. Certainly there is an atom which is lighter than Hydrogen named Muonium. It can be made inside Particle Accelerator. And it has only 2 micro seconds of life.

That’s it for this week. Meeting you next week.