Yes, I have fallen in love with this beautiful lady from the first day I met her, call it love at first sight, but she has never failed to amaze me. Why, get to know for yourself.
I cannot stress enough how beautiful it feels to code in Python because of its neat flawless syntax. There are no braces for you to keep on continually balancing, white spaces and tabs automatically do it for you . There are no semicolons to remember, no type safety to constantly bug you.
The ease of balancing high-level programming with low-level optimization is a particular strong point of Python code. Python code is meant to be as high level as reasonable – I’ve heard that in writing similar algorithms, on average you would write six lines of C/C++ code for every line of Python. However, as with most high-level languages, you often sacrifice code speed for programming speed.
We don't even have to declare the type, variables can be everything (int, string, float)
a = 'Ashish' b = 'Chandra' c = a + b print c
Now here comes a cool thing about Python. We can switch two variables without using a third one:
x, y = y, x
Printing in Python:
print "I love you Python"
Whatever project you are doing, you have rich set of libraries to chose from, be it on image processing, or natural language processing, or web scraping, virtually anything, and Python has all the libraries you need. These libraries come with excellent documentation.
What else you need, Welcome to Python.org documentation is the best in the world, and you don't have to search virtually anywhere to get the help.
Python has been an object-oriented language since it existed. Because of this, creating and using classes and objects are downright easy.
# class definition
class LoveMe:
love = 100
def dead(self):
return self.love == 0
# using the class
me = LoveMe()
print me.dead()
python -m SimpleHTTPServer
Take the numbers and multiply each by 3:
# gives [0, 10, 20, 30] [x * 3 for x in range(4)]
Now tell me, ain't my girl friend beautiful and will make any one jealous.
Python is an object-oriented language, just like JavaScript, C++, C#, Perl, Ruby, and other key programming languages. Python also requires less code to complete basic tasks, making it an economical language to learn. Python code is often 3-5 times shorter than Java, and 5-10 times shorter than C++. Companies such as Google, Yahoo!, Disney, Nokia, and IBM all use Python.
There are many resources available online like Online Python programming Training and tutorial But I personally found a site compact and very resourceful to learn python through interactive classes and video lectures for lifetime. I would like to share this link to you .
Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages.
Python is beautiful.
It is so concise and direct. You do not need to use ugly .substring() method in order to retrieve a specific range of indexes in a String, str[2:5] in python gets you that.
It is there for you whenever you need it. Want to scrap a website? Use an awesome library called scrapy which comes with caching, throttling and many more options. Intend to create a web api, Djanjo will be there for you. Hmm... Maybe you want to do some data science, tensorflow, theano, scikit will help you analyse more with less. You need to do some image processing such as resizing, adding color effects, just use PIL.
It is so clean. No more curly braces for if conditions, no more semi colons.
Python is like the "Fast Food" where they deliver everything very fast. She is HOT. She has this talent of attracting people near her. Well, there have been times I have felt that she is not the best. I later realized that I wasn't using her properly.
It has always been easy for me to give a O(n) running time while coding with python compared with many other languages. It is possible in python, because she is a superhero with all capabilities from her birth. You can tell that she is slow at times, but she beautifully accomplishes her job.
I have always loved coding in Python because she is easy to understand. I can type python codes in a notepad and execute it easily ( I can remember keywords easily) And, the syntax and structure isn't hard to adapt to.
I used to be someone who never codes with a proper syntax of indentation in any programming language and my codes are hard to be understood. But, Python changed me. She executes only if I wrote her with proper indentations. She is the "Dominant" Girl friend. She would like you only when you satisfy her requirements.
Now, I am someone who follow indentations for all the languages. She transformed me into a person who could write readable codes.
I wouldn't term Python as the best. But, she is the best place to begin to learn coding. She should be your "First Love". If you are planning to live with her for the entire life, you would need a divorce at some point of time in your life. Marry someone else :)
For anyone who doesn't understand the power of Python, try to read a file in Python. She does that in less than 2 lines :)
Still have a question? Ask your own!