SlideShare a Scribd company logo
Why I love Python!
By Johannes Lundberg
@johannesl
Founder & CEO of 46elks
The Interpreter
>>> 1+1
2
>>>
>>> s = 'hello'
>>> s.uppercase()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute
'uppercase'
Dynamic typing
i = 1234
hostname = '127.0.0.1'
python -i
python -i hello.py
>>> print i
1234
Great native types
i = 1234
name = 'Johannes Lundberg'
startups = [ 'Kundo', '46elks' ]
options = {
'port': 12345,
'logpath': '../debug.log'
}
Native types are objects
>>> startups.sort()
>>> startups
['46elks', 'Kundo']
s = 'Rxc3xa4kenskapsxc3xa5r'
print s.decode('utf-8')
Räkenskapsår
options.has_key('logpath')
name.split(' ')[-1]
(123).bit_length
dir()
>>> dir(’Pycon Sweden 2015’)
['capitalize', 'center', 'count', 'decode',
'encode', 'endswith', 'expandtabs', 'find',
'format', 'index', 'isalnum', 'isalpha',
'isdigit', 'islower', 'isspace', 'istitle',
'isupper', 'join', 'ljust', 'lower',
'lstrip', 'partition', 'replace', 'rfind',
'rindex', 'rjust', 'rpartition', 'rsplit',
'rstrip', 'split', 'splitlines',
'startswith', 'strip', 'swapcase', 'title',
'translate', 'upper', 'zfill']
Functions as first-class citizens
def writelog(s):
pass
if options.has_key('logpath'):
f = open(options['logpath'],'wb')
writelog = f.write
OOP is not mandatory
players = []
for line in open('players.txt'):
if not line.startswith('#'):
players.append( line.strip() )
Awesome standard libraries
import hashlib
import ftp
import urllib
s=urllib.urlopen('http://ph4.se/').read()
hashlib.sha256(s).hexdigest()
…
Works everywhere
scp hello.py ph4labs.com:.

More Related Content

What's hot

PHP 5.5.0 ChangeLog
PHP 5.5.0 ChangeLogPHP 5.5.0 ChangeLog
PHP 5.5.0 ChangeLog
Dhiraj Pandey
 
Controlling Arduino With PHP
Controlling Arduino With PHPControlling Arduino With PHP
Controlling Arduino With PHP
Thomas Weinert
 
Green dao
Green daoGreen dao
Green dao
彥彬 洪
 
Natural Language Toolkit (NLTK), Basics
Natural Language Toolkit (NLTK), Basics Natural Language Toolkit (NLTK), Basics
Natural Language Toolkit (NLTK), Basics
Prakash Pimpale
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
DEVTYPE
 
360|iDev
360|iDev360|iDev
360|iDev
Aijaz Ansari
 
Building Real Time Systems on MongoDB Using the Oplog at Stripe
Building Real Time Systems on MongoDB Using the Oplog at StripeBuilding Real Time Systems on MongoDB Using the Oplog at Stripe
Building Real Time Systems on MongoDB Using the Oplog at Stripe
MongoDB
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in Groovy
Ganesh Samarthyam
 
Introduzione a C#
Introduzione a C#Introduzione a C#
Introduzione a C#
Lorenz Cuno Klopfenstein
 
Ramda, a functional JavaScript library
Ramda, a functional JavaScript libraryRamda, a functional JavaScript library
Ramda, a functional JavaScript library
Derek Willian Stavis
 
Jakarta Commons - Don't re-invent the wheel
Jakarta Commons - Don't re-invent the wheelJakarta Commons - Don't re-invent the wheel
Jakarta Commons - Don't re-invent the wheel
tcurdt
 
No dark magic - Byte code engineering in the real world
No dark magic - Byte code engineering in the real worldNo dark magic - Byte code engineering in the real world
No dark magic - Byte code engineering in the real world
tcurdt
 
GreenDao Introduction
GreenDao IntroductionGreenDao Introduction
GreenDao Introduction
Booch Lin
 
2015 555 kharchenko_ppt
2015 555 kharchenko_ppt2015 555 kharchenko_ppt
2015 555 kharchenko_ppt
Maxym Kharchenko
 
Commit2015 kharchenko - python generators - ext
Commit2015   kharchenko - python generators - extCommit2015   kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
Maxym Kharchenko
 
What’s new in C# 6
What’s new in C# 6What’s new in C# 6
What’s new in C# 6
Fiyaz Hasan
 
Javascript ES6 generators
Javascript ES6 generatorsJavascript ES6 generators
Javascript ES6 generators
Ramesh Nair
 
Opa presentation at GamesJs
Opa presentation at GamesJsOpa presentation at GamesJs
Opa presentation at GamesJs
Henri Binsztok
 
Optimizing Tcl Bytecode
Optimizing Tcl BytecodeOptimizing Tcl Bytecode
Optimizing Tcl Bytecode
Donal Fellows
 

What's hot (19)

PHP 5.5.0 ChangeLog
PHP 5.5.0 ChangeLogPHP 5.5.0 ChangeLog
PHP 5.5.0 ChangeLog
 
Controlling Arduino With PHP
Controlling Arduino With PHPControlling Arduino With PHP
Controlling Arduino With PHP
 
Green dao
Green daoGreen dao
Green dao
 
Natural Language Toolkit (NLTK), Basics
Natural Language Toolkit (NLTK), Basics Natural Language Toolkit (NLTK), Basics
Natural Language Toolkit (NLTK), Basics
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
 
360|iDev
360|iDev360|iDev
360|iDev
 
Building Real Time Systems on MongoDB Using the Oplog at Stripe
Building Real Time Systems on MongoDB Using the Oplog at StripeBuilding Real Time Systems on MongoDB Using the Oplog at Stripe
Building Real Time Systems on MongoDB Using the Oplog at Stripe
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in Groovy
 
Introduzione a C#
Introduzione a C#Introduzione a C#
Introduzione a C#
 
Ramda, a functional JavaScript library
Ramda, a functional JavaScript libraryRamda, a functional JavaScript library
Ramda, a functional JavaScript library
 
Jakarta Commons - Don't re-invent the wheel
Jakarta Commons - Don't re-invent the wheelJakarta Commons - Don't re-invent the wheel
Jakarta Commons - Don't re-invent the wheel
 
No dark magic - Byte code engineering in the real world
No dark magic - Byte code engineering in the real worldNo dark magic - Byte code engineering in the real world
No dark magic - Byte code engineering in the real world
 
GreenDao Introduction
GreenDao IntroductionGreenDao Introduction
GreenDao Introduction
 
2015 555 kharchenko_ppt
2015 555 kharchenko_ppt2015 555 kharchenko_ppt
2015 555 kharchenko_ppt
 
Commit2015 kharchenko - python generators - ext
Commit2015   kharchenko - python generators - extCommit2015   kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
 
What’s new in C# 6
What’s new in C# 6What’s new in C# 6
What’s new in C# 6
 
Javascript ES6 generators
Javascript ES6 generatorsJavascript ES6 generators
Javascript ES6 generators
 
Opa presentation at GamesJs
Opa presentation at GamesJsOpa presentation at GamesJs
Opa presentation at GamesJs
 
Optimizing Tcl Bytecode
Optimizing Tcl BytecodeOptimizing Tcl Bytecode
Optimizing Tcl Bytecode
 

Viewers also liked

Why an api? - Exec I/O Mobile 2014
Why an api? - Exec I/O Mobile 2014Why an api? - Exec I/O Mobile 2014
Why an api? - Exec I/O Mobile 2014
Johannes Ridderstedt
 
Co curicular-140219110017-phpapp01
Co curicular-140219110017-phpapp01Co curicular-140219110017-phpapp01
Co curicular-140219110017-phpapp01
Prabhat Chaudhary
 
Islamic Concept of Ownership - (Urdu)
Islamic Concept of Ownership - (Urdu)Islamic Concept of Ownership - (Urdu)
Islamic Concept of Ownership - (Urdu)
Zaid Ahmad
 
Imam Azam’s Benefitting from The Companions and Imams of The Prophet SAW’s H...
 Imam Azam’s Benefitting from The Companions and Imams of The Prophet SAW’s H... Imam Azam’s Benefitting from The Companions and Imams of The Prophet SAW’s H...
Imam Azam’s Benefitting from The Companions and Imams of The Prophet SAW’s H...
Zaid Ahmad
 
Can an API be too simple?
Can an API be too simple?Can an API be too simple?
Can an API be too simple?
Johannes Ridderstedt
 
What is a game?
What is a game?What is a game?
What is a game?
Johannes Ridderstedt
 
Voice Hackathons ifrån Vinnova Forum Öppna Data 2016-05-20
Voice Hackathons ifrån Vinnova Forum Öppna Data 2016-05-20Voice Hackathons ifrån Vinnova Forum Öppna Data 2016-05-20
Voice Hackathons ifrån Vinnova Forum Öppna Data 2016-05-20
Johannes Ridderstedt
 
OpenTTD at trafiklab 2015 06-10
OpenTTD at trafiklab 2015 06-10OpenTTD at trafiklab 2015 06-10
OpenTTD at trafiklab 2015 06-10
Johannes Ridderstedt
 
Sayyiduna Sideeq ay-Akbar’s Status of Nearness and Companionship - (Urdu)
Sayyiduna Sideeq ay-Akbar’s Status of Nearness and Companionship - (Urdu)Sayyiduna Sideeq ay-Akbar’s Status of Nearness and Companionship - (Urdu)
Sayyiduna Sideeq ay-Akbar’s Status of Nearness and Companionship - (Urdu)
Zaid Ahmad
 
Islamic Teachings Series (5): Cleanliness and Prayer - (Urdu)
Islamic Teachings Series (5): Cleanliness and Prayer - (Urdu)Islamic Teachings Series (5): Cleanliness and Prayer - (Urdu)
Islamic Teachings Series (5): Cleanliness and Prayer - (Urdu)
Zaid Ahmad
 
A Collection of Prophetic Traditions on Divine Mercy - (Urdu)
A Collection of Prophetic Traditions on Divine Mercy - (Urdu)A Collection of Prophetic Traditions on Divine Mercy - (Urdu)
A Collection of Prophetic Traditions on Divine Mercy - (Urdu)
Zaid Ahmad
 
Islam and Public Welfare - (Urdu)
 Islam and Public Welfare - (Urdu) Islam and Public Welfare - (Urdu)
Islam and Public Welfare - (Urdu)
Zaid Ahmad
 
Lightning Talk @ PyCon Stockholm 2016
Lightning Talk @ PyCon Stockholm 2016Lightning Talk @ PyCon Stockholm 2016
Lightning Talk @ PyCon Stockholm 2016
Johannes Ridderstedt
 
Abp vs instruccion directa
Abp vs instruccion directa Abp vs instruccion directa
Abp vs instruccion directa olga cano luis
 
Crianza de-pollos ZOOTECNIA GENERAL
Crianza de-pollos ZOOTECNIA GENERAL Crianza de-pollos ZOOTECNIA GENERAL
Crianza de-pollos ZOOTECNIA GENERAL
Josselyn Yajayra
 
Enfermedades infecciosas de los animales
Enfermedades infecciosas de los animalesEnfermedades infecciosas de los animales
Enfermedades infecciosas de los animales
Josselyn Yajayra
 
Zootecnia General
Zootecnia  GeneralZootecnia  General
Zootecnia General
Josselyn Yajayra
 
The Architecture of an API Platform
The Architecture of an API PlatformThe Architecture of an API Platform
The Architecture of an API Platform
Johannes Ridderstedt
 

Viewers also liked (18)

Why an api? - Exec I/O Mobile 2014
Why an api? - Exec I/O Mobile 2014Why an api? - Exec I/O Mobile 2014
Why an api? - Exec I/O Mobile 2014
 
Co curicular-140219110017-phpapp01
Co curicular-140219110017-phpapp01Co curicular-140219110017-phpapp01
Co curicular-140219110017-phpapp01
 
Islamic Concept of Ownership - (Urdu)
Islamic Concept of Ownership - (Urdu)Islamic Concept of Ownership - (Urdu)
Islamic Concept of Ownership - (Urdu)
 
Imam Azam’s Benefitting from The Companions and Imams of The Prophet SAW’s H...
 Imam Azam’s Benefitting from The Companions and Imams of The Prophet SAW’s H... Imam Azam’s Benefitting from The Companions and Imams of The Prophet SAW’s H...
Imam Azam’s Benefitting from The Companions and Imams of The Prophet SAW’s H...
 
Can an API be too simple?
Can an API be too simple?Can an API be too simple?
Can an API be too simple?
 
What is a game?
What is a game?What is a game?
What is a game?
 
Voice Hackathons ifrån Vinnova Forum Öppna Data 2016-05-20
Voice Hackathons ifrån Vinnova Forum Öppna Data 2016-05-20Voice Hackathons ifrån Vinnova Forum Öppna Data 2016-05-20
Voice Hackathons ifrån Vinnova Forum Öppna Data 2016-05-20
 
OpenTTD at trafiklab 2015 06-10
OpenTTD at trafiklab 2015 06-10OpenTTD at trafiklab 2015 06-10
OpenTTD at trafiklab 2015 06-10
 
Sayyiduna Sideeq ay-Akbar’s Status of Nearness and Companionship - (Urdu)
Sayyiduna Sideeq ay-Akbar’s Status of Nearness and Companionship - (Urdu)Sayyiduna Sideeq ay-Akbar’s Status of Nearness and Companionship - (Urdu)
Sayyiduna Sideeq ay-Akbar’s Status of Nearness and Companionship - (Urdu)
 
Islamic Teachings Series (5): Cleanliness and Prayer - (Urdu)
Islamic Teachings Series (5): Cleanliness and Prayer - (Urdu)Islamic Teachings Series (5): Cleanliness and Prayer - (Urdu)
Islamic Teachings Series (5): Cleanliness and Prayer - (Urdu)
 
A Collection of Prophetic Traditions on Divine Mercy - (Urdu)
A Collection of Prophetic Traditions on Divine Mercy - (Urdu)A Collection of Prophetic Traditions on Divine Mercy - (Urdu)
A Collection of Prophetic Traditions on Divine Mercy - (Urdu)
 
Islam and Public Welfare - (Urdu)
 Islam and Public Welfare - (Urdu) Islam and Public Welfare - (Urdu)
Islam and Public Welfare - (Urdu)
 
Lightning Talk @ PyCon Stockholm 2016
Lightning Talk @ PyCon Stockholm 2016Lightning Talk @ PyCon Stockholm 2016
Lightning Talk @ PyCon Stockholm 2016
 
Abp vs instruccion directa
Abp vs instruccion directa Abp vs instruccion directa
Abp vs instruccion directa
 
Crianza de-pollos ZOOTECNIA GENERAL
Crianza de-pollos ZOOTECNIA GENERAL Crianza de-pollos ZOOTECNIA GENERAL
Crianza de-pollos ZOOTECNIA GENERAL
 
Enfermedades infecciosas de los animales
Enfermedades infecciosas de los animalesEnfermedades infecciosas de los animales
Enfermedades infecciosas de los animales
 
Zootecnia General
Zootecnia  GeneralZootecnia  General
Zootecnia General
 
The Architecture of an API Platform
The Architecture of an API PlatformThe Architecture of an API Platform
The Architecture of an API Platform
 

Similar to Why I love Python!

Python Exception handling using Try-Except-Finally
Python Exception handling using Try-Except-FinallyPython Exception handling using Try-Except-Finally
Python Exception handling using Try-Except-Finally
Vinod Srivastava
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
KHNOG
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
DRVaibhavmeshram1
 
Python for Penetration testers
Python for Penetration testersPython for Penetration testers
Python for Penetration testers
Christian Martorella
 
Python bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of NairobiPython bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of Nairobi
krmboya
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
Daniel Greenfeld
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
Matt Harrison
 
Becoming a Pythonist
Becoming a PythonistBecoming a Pythonist
Becoming a Pythonist
Raji Engg
 
PYTHON
PYTHONPYTHON
PYTHON
JOHNYAMSON
 
Python lecture 03
Python lecture 03Python lecture 03
Python lecture 03
Tanwir Zaman
 
Pythonppt28 11-18
Pythonppt28 11-18Pythonppt28 11-18
Pythonppt28 11-18
Saraswathi Murugan
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE
Saraswathi Murugan
 
Hands on Session on Python
Hands on Session on PythonHands on Session on Python
Hands on Session on Python
Sumit Raj
 
An Intro to Python in 30 minutes
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutes
Sumit Raj
 
PenTest using Python By Purna Chander
PenTest using Python By Purna ChanderPenTest using Python By Purna Chander
PenTest using Python By Purna Chander
nforceit
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
ssuserd64918
 
4 b file-io-if-then-else
4 b file-io-if-then-else4 b file-io-if-then-else
4 b file-io-if-then-else
Malik Alig
 
Intro
IntroIntro
Python build your security tools.pdf
Python build your security tools.pdfPython build your security tools.pdf
Python build your security tools.pdf
TECHNOLOGY CONTROL CO.
 
What's new in Python 3.11
What's new in Python 3.11What's new in Python 3.11
What's new in Python 3.11
Henry Schreiner
 

Similar to Why I love Python! (20)

Python Exception handling using Try-Except-Finally
Python Exception handling using Try-Except-FinallyPython Exception handling using Try-Except-Finally
Python Exception handling using Try-Except-Finally
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
 
Python for Penetration testers
Python for Penetration testersPython for Penetration testers
Python for Penetration testers
 
Python bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of NairobiPython bootcamp - C4Dlab, University of Nairobi
Python bootcamp - C4Dlab, University of Nairobi
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
 
Becoming a Pythonist
Becoming a PythonistBecoming a Pythonist
Becoming a Pythonist
 
PYTHON
PYTHONPYTHON
PYTHON
 
Python lecture 03
Python lecture 03Python lecture 03
Python lecture 03
 
Pythonppt28 11-18
Pythonppt28 11-18Pythonppt28 11-18
Pythonppt28 11-18
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE
 
Hands on Session on Python
Hands on Session on PythonHands on Session on Python
Hands on Session on Python
 
An Intro to Python in 30 minutes
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutes
 
PenTest using Python By Purna Chander
PenTest using Python By Purna ChanderPenTest using Python By Purna Chander
PenTest using Python By Purna Chander
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
 
4 b file-io-if-then-else
4 b file-io-if-then-else4 b file-io-if-then-else
4 b file-io-if-then-else
 
Intro
IntroIntro
Intro
 
Python build your security tools.pdf
Python build your security tools.pdfPython build your security tools.pdf
Python build your security tools.pdf
 
What's new in Python 3.11
What's new in Python 3.11What's new in Python 3.11
What's new in Python 3.11
 

Recently uploaded

留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
bseovas
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
saathvikreddy2003
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
uehowe
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
bseovas
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
uehowe
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
uehowe
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
ukwwuq
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
ysasp1
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 

Recently uploaded (20)

留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 

Why I love Python!

  • 1. Why I love Python! By Johannes Lundberg @johannesl Founder & CEO of 46elks
  • 2. The Interpreter >>> 1+1 2 >>> >>> s = 'hello' >>> s.uppercase() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'str' object has no attribute 'uppercase'
  • 3. Dynamic typing i = 1234 hostname = '127.0.0.1'
  • 4. python -i python -i hello.py >>> print i 1234
  • 5. Great native types i = 1234 name = 'Johannes Lundberg' startups = [ 'Kundo', '46elks' ] options = { 'port': 12345, 'logpath': '../debug.log' }
  • 6. Native types are objects >>> startups.sort() >>> startups ['46elks', 'Kundo'] s = 'Rxc3xa4kenskapsxc3xa5r' print s.decode('utf-8') Räkenskapsår options.has_key('logpath') name.split(' ')[-1] (123).bit_length
  • 7. dir() >>> dir(’Pycon Sweden 2015’) ['capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
  • 8. Functions as first-class citizens def writelog(s): pass if options.has_key('logpath'): f = open(options['logpath'],'wb') writelog = f.write
  • 9. OOP is not mandatory players = [] for line in open('players.txt'): if not line.startswith('#'): players.append( line.strip() )
  • 10. Awesome standard libraries import hashlib import ftp import urllib s=urllib.urlopen('http://ph4.se/').read() hashlib.sha256(s).hexdigest() …