Are you new to the world of programming?If yes, you must be anxious about learning the fundamentals and build a solid foundation in the field of software engineering.But wait, is the syntax of programming languages are so overwhelming to you that you are already loosing hope? Don’t worry because python is savior.Trust me, as they say, literally “Python is Beautiful“.
To give you a simple example, if you are little familiar with java you know how tough it is to write a simple print statement of “Hello World” . “system.out.println(“Hello World”);”.It is difficult to type such long commands and understand what it really means for a beginner.Also, if you forget that tiny semi-colon, you will get compilation error. Now you see how to do it in python.
That is all you need and it will work for you. isn’t it really interesting? I will give few more example how we can easily get the stuff done without using any difficult syntax.Suppose you want to print the elements in an array along with their index.Here is the code to do it in a simple manner.
for i,value in enumerate(list1):
Now, Suppose you want to print two list of equal length simultaneously.Generally, most programmers will use nested for loop.
for a, b in zip(list1,list2):
print (b) print(“———“)
So, by now you have realized how powerful python can be with its rich set of functionality.At least you can correlate with any other language and easily identify the simplicity with which it performs the complex operations.In future post we will see more stuffs that python is capable of and develop some strong foundations of computer science using them.