• Python Official Site. Source:
  • Python features. Source: Devopedia

Python

Improve this article. Show messages.

Summary

Python Official Site. Source:

Python is general purpose programming language[blends procedural+functional+object oriented functionality] in scripting mode. It has efficient high-level data structures, Powerful flexible string handling and a simple but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.This pseudo-code nature of Python is one of its greatest strengths. It allows you to concentrate on the solution to the problem rather than the language itself. Python has an extraordinarily simple syntax.

Pep8 is a style guide which gives the coding convention for code comprising the standard library in the main Python distribution

Python is an experiment in how much freedom programmers need:

Too much freedom and nobody can read another's code;

Too little and expressiveness is endangered.

- Guido van Rossum

Discussion

  • What's the historical context in which Python was invented?

    Python was written by Guido van Rossum at CWI in the Netherlands as a successor to the ABC programming language capable of exception handling and interfacing with the Amoeba operating system. It was not possible to extend ABC Programming language and it would be foolish to write a Amoeba Specific language. Few features were conceived in the late 1980s and implemented started in 1990. Further it was posted on USENET in 1991.

  • What's so attractive about Python?

    • Python can be easy to pick up whether you're a first time programmer or you're experienced with other languages
    • Python allows to write the same program in much fewer lines of code
    • Very clear readable syntax and keywords, with proper indentation being part of syntax checking
    • Declaration of variables not required. object oriented and imperative programming can be mixed
    • Easy to manipulate large data, linear algebra and matrix operations with pandas, numpy, scipy, sklearn etc.
    • Lists, stacks, queues, dictionaries, you name it python has it. Moreover complex data structures like graphs can be easily implemented in python using a list of dictionaries

  • How do you classify Python as a language ?
    Python features. Source: Devopedia

    Python is a programming language that lets you work more quickly and integrate your systems more effectively.

    Python is a high-level, interpreted, interactive and object-oriented scripting language.

    It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes.

    Python is Interpreted: Python is processed at runtime by the interpreter. You do not need to compile your program before executing it. This is similar to PERL and PHP.

    Python is Interactive: You can actually sit at a Python prompt and interact with the interpreter directly to write your programs.

    Python is Object-Oriented: Python supports Object-Oriented style or technique of programming that encapsulates code within objects.

    Python is a Beginner's Language: Python is a great language for the beginner-level programmers and supports the development of a wide range of applications from simple text processing to WWW browsers to games.

    Python is portable: it runs on many Unix variants, on the Mac, and on Windows 2000 and later.

  • Can Python be used in embedded systems?

    Python can be used in embedded, small or minimal hardware devices, depending on how limiting the devices actually are.

    Devices which could be considered as "embedded" by modern standards and which can run tuned versions of CPython include the following

    Gumstix

    Raspberry Pi

    BeagleBone Black

    Apart from this MicroPython is there for Embedded System:

    MicroPython : MicroPython is a lean and efficient implementation of the Python 3programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments. It aims to be as compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.

    The pyboard is a compact and powerful electronics development board that runs MicroPython. It connects to your PC over USB, giving you a USB flash drive to save your Python scripts, and a serial Python prompt (a REPL) for instant programming. Works with Windows, Mac and Linux.

  • What are the main differences between Python2 and Python3?

    Python 2.X

    • print is a statement
    • tt has ASCII str() types and unicode() type , but no byte type
    • two types of integers: C based integers (int) and Python long integer (long)
    • range() returning a list of numbers and xrange() returning an object
    • raising exceptions:raise IOError("file error") or raise IOError "file error"
    • Return type of Division is int
    • supports - rawinput() return as string and input() return as int

    Python 3.X

    • print() is a built-in function
    • all strs are Unicode (utf-8) strings, and 2 byte classes: byte and byte arrays
    • all integers are python long integers so only one integer type (int)
    • range() returning an object. and range() has new contains method which speeds up the lookup compared to python 2
    • raising exceptions:raise IOError("file error")
    • return type of Division is float
    • input() wil return a string

  • Are there techniques to make my Python2 program run within a Python3 environment?

    Automated Python 2 to 3 code translation - this python program will convert the python2 source code to python 3 source code. It will inside your python folder tools/scripts. basic arguments is list of files or directories to transform. if we want to write the changes in source file we can give -w

    using future (future) module in python make the python 2 and python 3 code compatible in both python 2 and 3 platforms.

References

  1. BeagleBone. 2017. "How to write and run a python program on the beagle bon" How to write and run a python program on the beagle bon. April 17. Accessed 2017-04-22
  2. Charles Marsh. 2017. "A Python Implementation Comparison" Python.Copyright 2010 - 2017 Toptal, LLC. Accessed 2017-04-22
  3. Embedded Python. 2017. "Help for Embedded projects using Python" Help for Embedded projects using Python.April 17. Accessed 2017-04-22
  4. Gumstix. 2009. "Installing-python-in-Gumstix" Installing-python-in-Gumstix. March 2009 . Accessed 2017-04-22
  5. Micropython. 2017. "Micropython" Micropython.April 17. Accessed 2017-04-22
  6. Pyboard. 2017. "Pyboard Reference Guide" Pyboard Reference Guide .April 17. Accessed 2017-04-22
  7. Python Docs. 2017. "Automated Python 2 to 3 code translation" Retrieved 2017-04-26
  8. Python History. 2017. "Python History" why-was-python-created-in-the-first-place. April 17. Accessed 2017-04-22.
  9. Python.org. 2017. "Python Documentation" Python 3.6.1 documentation. April 17. Accessed 2017-04-22.
  10. Rassberrypi program. 2017. "How to write and run a python program on the raspberry pi"How to write and run a python program on the raspberry pi. April 17. Accessed 2017-04-22
  11. Sebastian Raschka. 2016. "Key differences between Python 2.7.x and Python 3.x" key Differences updated Feb 2016

Milestones

1980

The Python programming language was conceived in the late 1980s

Dec
1989

python implementation was started

1991

python was uploaded to USENET

Oct
2000

Python 2.0 was released

Dec
2008

Python 3.0 was released

Apr
2020

Python 2.7 will retire.

Tags

See Also

Top Contributors

Last update: 2017-04-30 07:05:55 by Anu-S
Creation: 2017-04-22 11:28:26 by ashish2702

Article Stats

1057
Words
4
Chats
3
Authors
7
Edits
11
Likes
565
Hits
BETA V0.10