Professional Documents
Culture Documents
Pythonin Marathi
Pythonin Marathi
net/publication/341712991
Python in Marathi
CITATIONS READS
0 580
1 author:
Mayur Patil
Vishwakarma University
14 PUBLICATIONS 5 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Intrusion Detection by Forensic Method in Private Cloud using Eucalyptus View project
All content following this page was uploaded by Mayur Patil on 28 May 2020.
• Readability counts.
• There should be one-- and preferably only one --obvious way to do it.
• Although that way may not be obvious at first unless you're Dutch.
• Batteries Included
• Regular expressions, documentation generation, unit testing, threading, databases, web
browsers, CGI, FTP, email, XML, XML-RPC, HTML, WAV files, cryptography, GUI (graphical
user interfaces),
• One liners
• 2to3
• virtualenv
IDE and EDITORS
Editors
Notepad++
Sublime Text
IDLE Command and Code Editor
IDE
VSCode
Atom
Pyzo
Jupyter Notebook
Installation modes:
• Package Installer:
• Pip
• python get-pip.py
• python3 -m pip install boto3
• pip install Django==1.10.5
• pip uninstall Django
• whl (wheels)
• For replace eggs, PEP 376 aims at DB of installed python distributions dist_info & PEP 426
metadata for Python Software packages.
• Older Installation Methods
• egg
• Similar like .jar in java, it consists of code, resources, metadata.
• Poor scheme due to traces remained on systems.
• Setuptools
• easy_setup.py
• Source Compilation
• .tar.gz or .tgz or .xz
• Bleeding method: make or break
Structure of Program
Comments
• #
• “”” “””
Literal Constants
Numbers
Strings
• Single Quotes
• Double Quotes
• Triple Quotes
Data Structures:
• Lists
ram = "warrior"
L = [1, "Ram", 't', 2**3, ram]
print (L)
ram= "samarth"
print (L)
L.append('S') #to append items in List
print (L)
L.pop(2) #to remove elements from List
print (L)
print (L[1])
• When:
List keeps order
Data Structures:
• Tuples
samp = "this is sample"
tup = ( 1, "Shiv", 'S', 2**3, samp ) print (tup)
samp = "this is not" print (tup)
print (tup[1])
• When:
Tuples are fixed size in nature
Data Structures:
• Actual Difference:
• Lists
>>> animals.append('mat')
Python tuples have a surprising trait: they are immutable, but their values may
change. This may happen when a tuple holds a reference to any mutable
object, such as a list.
Dictionary
d['Entrance Door']=123
d['Rear Door']=456
print (d)
print (d.keys())
print (d.values())
Operators and Expressions:
• Plus
• Minus
• Multiply
• Power
• Divide (/)
• Divide and Floor (//)
• Less than <
• Greater than >
• Less equal <=
• Greater equal >=
• == COMPARISON OPERATOR
• = ASSIGNMENT OPERATOR
Control Flow:
• If – else
• For
ram_func(2)
• Editor
Module:
# change extension
>>> imghdr.what("index.gif") 'jpeg‘
Swapping
• a, b = b, a
Lie Detection
• ‘ram’ in ‘ramayan’
• ‘kans’ in ‘ramayan’
Install Python on Linux
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz tar
xfvJ Python-3.5.1.tar.xz -C /opt/
cd Python-3.5.1
./configure --prefix=/opt/python3.5 make
# To make idle3.5, you need tk's development to produce tkinter sudo
apt-get install tk8.6-dev
sudo make install