abhijit838 / PythonBasics

An introduction to python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pythonBasics

An introduction to python.

How python runs codes:

Python is a scripting language. That means all the python codes are interpreted by a software package called python interpreter. But if we want to dig a little bit more inside then we will see some interesting things. Python software package has a compiler and PVM(Python Virtual Machine).Internally the almost hidden from you. First it compiles your source codes(statements) into a intermidiate code called byte code then interpreter reads it and runs on PVM. If python process has permission to write file in your system then you can see a file with extension with xxx.pyc(byte code file). Other wise compiler will write the byte code file in your system memory. Purpose of byte code is to speed up your enter process(no need to compile again untill you change the source code) and to make it system independent. One more interesting thing is that if have compiled file then no need to think about python version. It will put a version tag inside your byte code and it will covert your byte code to new byte code compatible to new virsion.

How we run codes:

If you have installed python in your system and already done with path variable setup then in terminal(unix/linux/mac) or command prompt(windows) just type python. It will give you a n interactive python shell session with ">>>" . Then you can write your python code. Or you can write a py file like 'hello.py' ,and run in terminal , command like>: >>>python [/file path][/filename.py].

Lets start with small small codes snipate directly from python shell:

Road Map:

Inbuilt data types.
Basic math operations.
Working with Numbers, String, List, Touple, Set, Dictionary.
Condition and conditional operators, nested condition.
Iteration with while and for.
More in iteration with breaks and continue.
Function
Some inbuilt functions.
Module import and reload.
File handaling.
Exception.
Object oriented concepts
Reg Exp
Date operations
Database access
XML/JSON handaling
Numeric data handaling with NumPy.
--------------------------------------
If possible then algorithms like linear, nonlinear data structures.

About

An introduction to python.