What is Python?
Features of Python
Python is currently my favorite and most preferred language to work on because of its simplicity, powerful libraries, and readability. You may be an old school coder or may be completely new to programming, Python is the best way to get started!
Python provides features listed below :
- Simplicity: Think less of the syntax of the language and more of the code.
- Open Source: A powerful language and it is free for everyone to use and alter as needed.
- Portability: Python code can be shared and it would work the same way it was intended to. Seamless and hassle-free.
- Being Embeddable & Extensible: Python can have snippets of other languages inside it to perform certain functions.
- Being Interpreted: The worries of large memory tasks and other heavy CPU tasks are taken care of by Python itself leaving you to worry only about coding.
- Huge amount of libraries: Data Science? Python has you covered. Web Development? Python still has you covered. Always.
- Object Orientation: Objects help breaking-down complex real-life problems into such that they can be coded and solved to obtain solutions.
To sum it up, Python has a simple syntax, is readable, and has great community support. You may now have the question, What can you do if you know Python? Well, you have a number of options to choose from.
- Data Scientist
- Machine Learning and Artificial Intelligence
- Internet of Things
- Web Development
- Data Visualization
Now when you know that Python has such an amazing feature set, why don’t we get started with the Python Basics?
Jumping to the Python Basics
To get started off with the Python Basics, you need to first install Python in your system right? So let’s do that right now! You should know that most Linux and Unix distributions these days come with a version of Python out of the box.
Once you are set up, you need to create your first project. Follow these steps:
- Create Project and enter the name and click create.
- Right-click on the project folder and create a python file using the New->File->Python File and enter the file name
You’re done. You have set up your files to start coding with Python. Are you excited to start coding? Let’s begin. First and foremost, the “Hello World” program.
Output: Hello World, Welcome to PYTHON!
Comments in Python
Single line comment in Python is done using the # symbol and ”’ for multi-line commenting. If you want to know more about comments, you can read this full-fledged guide. Once you know commenting in Python Basics, let’s jump into variables in Python Basics.
Variables in simple words are memory spaces where you can store data or values. But the catch here in Python is that the variables don’t need to be declared before the usage as it is needed in other languages. The data type is automatically assigned to the variable. If you enter an Integer, the data type is assigned as an Integer. You enter a string, the variable is assigned a string data type. You get the idea. This makes Python dynamically typed language. You use the assignment operator (=) to assign values to the variables.
Output: Welcome to PYTHON! 123 3.142