What is Python?
Python is a popular programmatic language. It was invited by Guido Van Rossum & released on 1991.
Using Python we can develop
Web application Development (server side)
Software development
System scripting
Mathematics algorithms
What Python Can do?
- Python can used on servers to create web applications
- Python can used alongside software to create workflows
- Python can connect database systems. It can read and update files.
- Python can used to handle big data and perform complex mathematics
- Python can used for rapid prototyping, or for production ready for software development.
Why Python?
• Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
• Python has a simple syntax similar to the English language.
• Python has a syntax that allows developers to write programs with fewer lines than some other programming languages.
• Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
• Python can be treated in a procedural way, an object-oriented way, or a functional way
Comparison with other programming languages
Python is often compared to other interpreted languages such as Java, JavaScript, Perl, Tcl. or Smalltalk. Comparisons to C++, Common Lisp, and Scheme can also be enlightening. In this section, I will briefly compare Python to each of these languages. These comparisons concentrate on language issues only.
Java
Python programs are generally expected to run slower than Java programs, but they also take much less time to develop. Python programs are typically 3-5 times shorter than equivalent Java programs. This difference can be attributed to Python’s built-in high-level data types and its dynamic typing. Javascript
Python’s “object-based” subset is roughly equivalent to JavaScript. Like JavaScript (and unlike Java). Python supports a programming style that uses simple functions and variables without engaging in class definitions. However, for JavaScript, that’s all there is. Python, on the other hand, supports writing much larger programs and better code reuse through a true object-oriented programming style, where classes and inheritance play an important role.
Perl
Python and Perl come from a similar background (Unix scripting, which both have long outgrown), and sport many similar features, but have a different philosophy. Perl emphasizes support for common application-oriented tasks, e.g. by having built-in regular expressions, file scanning and report generating features. Python emphasizes support for common programming methodologies such as data structure design and object-oriented programming, and encourages programmers to write readable (and thus maintainable) code by providing an elegant but not overly cryptic notation. As a consequence, Python comes close to Perl but rarely beats it in its original application domain; however Python has an applicability well beyond Perl’s niche.
Tel
Like Python. Tel is usable as an application extension language, as well as a stand-alone programming language However, Tcl, which traditionally stores all data as strings, is weak on data structures, and executes typical code much slower than Python. Tel also lacks features needed for writing large programs, such as modular namespaces. Thus, while a “typical” large application using Tcl usually contains Tcl extensions written in C or C++ that are specific to that application, an equivalent Python application can often be written in “pure Python” Of course, pure Python development is much quicker than having to write and debug a C or C++ component. It has been said that Tcl’s one redeeming quality is the Tk toolkit Python has adopted an interface to Tk as its standard GUI component library.
Tcl 8.0 addresses the speed issuse by providing a bytecode compiler with limited data type support, and adds namespaces. However, it is still a much more cumbersome programming language
Smalltalk
Perhaps the biggest difference between Python and Smalltalk is Python’s more “mainstream” syntax, which gives it a leg up on programmer training. Like Smalltalk, Python has dynamic typing and binding, and everything in Python is an object. However, Python distinguishes built in object types from user-defined classes, and currently doesn’t allow inheritance from built-in types Smalltalk’s standard library of collection data types is more refined, while Python’s library has more facilities for dealing with Internet and WWW realities such as email, HTML and FTP
Python has a different philosophy regarding the development environment and distribution of code. Where Smalltalk traditionally has a monolithic “system image which comprises both the environment and the user’s program, Python stores both standard modules and user modules in individual files which can easily be rearranged or distributed outside the system. One consequence is that there is more than one option for attaching a Graphical User Interface (GUI) to a Python program, since the GUI is not built into the system.
C++
Almost everything said for Java also applies for C++, just more so where Python code is typically 3-5 times shorter than equivalent Java code, it is often 5: 10 times shorter than equivalent C++ code! Anecdotal evidence suggests that one Python programmer can finish in two months what two C++ programmers can’t complete in a year Python shines as a glue language used to combine components written in C++