The importance of Python language first began to wander in my mind, once I started to learn Data Science related subjects. Then I started searching for job requirements of a Data Scientist and of course almost all the jobs had mentioned the knowledge of Python as a requirement/ advantage. Furthermore, when I talked to the lecturers at my uni and some experts in the industry they said the same. So… finally, I promised myself to learn it and started a course online. Well… it seems very interesting 🙂 If you have a prior knowledge on programming it will be even easier.
Once you open the Python shell, it will look like this.
Basically, a simple print command can print anything.
Variables can be saved with a ‘=’ similar to many other languages in order to refer the values in the program. But the good thing is, you don’t have to assign a type in front of the variable name like some other languages (such as Java).
To know the data Type, you can use the type() function.
To convert different data types, there are functions. For example, to convert to String, you can use str(). Similarly, int(), float() and bool() can be used.
This is a very basic lesson on Python and as I learn more I will continue sharing with you 🙂