top of page

Hello World In Python

Writer's picture: Srujan kachhwahaSrujan kachhwaha

Technology is enhancing at a very fast pace, everyday developers, futurists, and entrepreneurs are launching their new idea for a better future and every idea is built over the strong foundation of technology and IT support.

People are moving to comfort, They seek comfort in living, eating, working, and not what.


And why not? The only aim of a better future is the ease of doing work, and following this mantra python comes to make our work easy. let's dive into the technical details of python.


Python is an interpreted language, It does not need a compiler!


Unlike any other programming language, Python is an interpreted language, this means that it uses an interpreter instead of a compiler to compile a code.


Let me give you an example of a python program that swaps the values of two variables, you will understand why python is an easy-to-go.


>>> a = 5
>>> b = 6
>>> a,b = b,a
>>> a
6
>>>b
5

The above block is called an interpreter. It takes one line of code at a time and compiles it into a machine-understandable format. Easy to go enough right?

What is easier than understanding the code line-by-line? This tells us how things are working.


A Simple Python Script


So, You got an idea of what a python interpreter looks like. Now let's have a look at what a Python script looks like.


a = 5
b = 6

print(a+b)

Open any text editor and write the above lines of code, save the file with a name you like followed by a .py extension. I am saving this file as demo.py.


That's it, your python script is ready! No includes no curly braces and no variable declarations. Like I said, easy to go with the flow.


Variables In Python


Now, Why don't need variable declaration? Because Python handles them dynamically, Let me show you this example:

>>> a = 5
>>> type(a)
<class 'int'>
>>> a = "hello"
>>>type(a)
<class 'str'>

See! the variable changes according to the type of value you give it to be. you don't need to declare the type of variables like in other programming languages.


There are a lot more easy fixes in python available for us so that we don't worry about every little small thing and concentrate on what we actually do and how we actually want to build our program.


When you use python, you think about the logic of what you want to build, the complexities are handled by python very easily.


Python is everywhere, No matter if you are a backend developer or DevOps, or App developer, you will always see python as an option to work on.


We will be covering every python implemented technology here, this will not be like other tutorials on the internet, but a platform to explore and know more about python language and how we can implement it to make our work a piece of cake.



20 views0 comments

Recent Posts

See All

Comments


Graphic Cubes

Subscribe To Get Latest Updates

Subscribe to our newsletter • Don’t miss out!

Thanks for subscribing!

Blogger
bottom of page