Python: Habits that give away inexperience — Part 1
We all know that Python is really vast and popular language in the technology industries. And also it is one of the niche skills to have. Its really good to have knowledge in Python and also work on its various modules.
But there are couple of habits which I believe one should have to change in order to be an expert and at the same time writing codes efficiently and effectively. I will also brief about like why one should not be using those and what alternatives one can use.
Some of the things might be an issue and many of the things people might already know. So nevertheless this things will help you to get better or catch any such habits you still hanging on to. So, lets get started
1. Using import *
importing everything from a module, makes your namespace untidy with variables. So, only import the things which you need.
# importing everything
from itertools import *
# importing the required fucntion
from itertools import count
Another thing I wanted to add, at time of importing, import the module not the function. This is to make it much clearer like from where that function is getting called.
# importing fuction
from…