Today I will share about how to learn python in a minute, in this post I will use
python version 3 only and discuss about
python keyword, using python module, python mode, basic syntax, operator, function, python data type and class.
This post is not deep concept, but about basic concept before we start deep learning into python.
Python
is easy programming language to learn, powerful programming language.
It has efficient high-level data structures 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.
Learning python is not hard because
it's "human language" :-) it's mean that python language is more
readable, portable, clean, easy to develop and easy to extends.
Ok lets start don't wasting time :D.
Python Mode
Python
have two mode which is interpreter mode and scripting mode, we don't
need to compile the code because compilation process to byte code will
be handled by python interpreter.
You need to install python interpreter before you can start using python, can be downloaded from here
python.org. Choose the right one for you distribution OS.
Interpreter
mode can be access from terminal emulator in linux and mac or cmd in
windows. Most linux distro include python interpreter on each their
distribution.
From terminal emulator or cmd you simply type python you will get in to python interpreter depend on your system.
Python 3.4.3 (default, Mar 10 2015, 14:53:35)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
With interpreter method you can use it as calculator like sum, div, mod etc
Python 3.4.3 (default, Mar 10 2015, 14:53:35)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
2
>>> 3*3
9
>>> 3**4
81
>>> 6%2
0
>>>