What is Python?

Python :
  • Python is an interpreted language. Python does not need to be compiled before it is run. Other interpreted languages include PHP and Ruby.
  • Python is dynamically typed, this means that you don't need to state the types of variables when you declare them or anything like that. You can do things like x=123 and then x="Hello" without an error.
  • Python is well suited to object orientated programming in that it allows the definition of classes along with composition and inheritance.
  • In Python, functions are first-class objects. This means that they can be assigned to variables, returned from other functions and passed into functions. Classes are also first class objects.
  • Writing Python code is quick but running it is often slower than compiled languages. Python allows the inclusion of C based extensions so bottlenecks can be optimized away and often are. The numpy package is a good example of this, it's really quite quick because a lot of the number crunching it does isn't actually done by Python.
  • Python finds use in many spheres - web applications, automation, scientific modeling, big data applications and many more. It's also often used as "glue" code to get other languages and components to play nice.
  • Python makes difficult things easy so programmers can focus on overriding algorithms and structures rather than low-level details.
  • Features / Advantages of Python :
    • Simple and minimalistic
    • Open source
    • High-level language:
      • Never need to bother about the low-level details such as managing the memory used by the program.
    • Interpreted:
      • We doesn't need to compile and convert it to binary. It just the program directly from the source code.
      • Python coverts source code written by the programmer into intermediate language i.e. byte code, which is again translated it into the native language / machine language that is executed so python is an interpreted language.
    • Python supports Object Oriented as well as procedure oriented programming.
    • Dynamically typed language
  • Disadvantages of Python :
    • Python is not the best for memory intensive task.
    • Python is an interpreted language and is slow compared to C/C++ or java.
    • Python is not a great choice for a high graphic 3D game that takes up a lot of CPU.

Comments

Popular posts from this blog

What is composite key?

What are the different data types in Python?

What is __repr__ function?