SlideShare a Scribd company logo
Introduction to Python 3
“Your first scripting in Python 3.x” workshop
Youhei Sakurai, TC, CSS, YSJ
APAC-EU time zone, 30th September, 2016
Youhei Sakurai
• Intermediate Pythonista
• Started to learn Python in 2010.
• Have been introducing Python several times since 2011.
• Publishing one package on PyPI – PyMemoryModule.
• My name is written in change log of lxml 3.6.0. 
Rules
• Will finish on time even if some of topics are not completed.
• Turn on your web-cam to enhance your active involvement.
• Raise your questions to drive bi-directional communication.
• If it is beyond beginner’s level, I’d suggest to have separate call.
• If there’re too many, I’d select rather important ones for everyone.
• Stay sharp with your text editor and Python installer.
Agenda
• What’s Python
• How Python looks like
• Let’s set up Python
• “Hello world!”
• Do basic practices
• Your first scripting
• Study materials
• Kahoot quiz
Goals
• Make Python ready on your workstation.
• Make yourself ready in the Python 3.x Ocean.
• Get breadcrumb list to learn Python 3.x.
• And... Let you get high score at Kahoot quiz. 
What’s Python
Make Python ready
Make yourself ready
Get breadcrumb list
What’s Python
• One of programing languages like Java, C, Perl, Ruby, etc
• No compilation, no type definitions, no magic, no callback hell
• Well documented, cross platform, multi-purpose glue language
• Used in Amazon, Google, Yahoo, Dropbox, NASA, etc
OK, but why Python?
Why Python
• Batteries included
• Web server, database, GUI, networking, regex, XML, JSON, archiving, C/C++
integration, package manager, async I/O, serialization, etc.
• Not a toy, powerful enough
• Can write anything from one tiny script to large scaled enterprise application.
• Defacto standard language in IT industry
• Even I can write Python codes better than English email. 
Sounds like none of my business…
Why Python for you
• Python runs anywhere
• You can carry the most professional toolset everywhere
• Python makes sense very well
So, is Python perfect?
A few disadvantages in Python
• Slower than C/C++ and assembly
• No JIT (Just-In-Time) compiler equipped in CPython
• GIL (Global Interpreter Lock) prevents real parallelism in CPython
• Jython and IronPython falls much behind CPython
Who cares?
So what’s Python…
Python is the professional toolset never ever invented before!!
A bit more about Python
History of Python
• Created in 1989 by Guido Van Rossum
• Python 1.0 released in 1994
• Python 2.0 released in 2000
• Python 3.0 released in 2008
• Python 2.7 released in 2010
• Python 3.5 released in 2015
• No Python 2.8 planned (*1)
• EOL of Python 2.7 planed in 2020 (*2)
*1 … PEP 404, *2 … PEP 373
Zen of Python (by Tim Peters)
• Beautiful is better than ugly.
• Explicit is better than implicit.
• Simple is better than complex.
• Complex is better than complicated.
• Flat is better than nested.
• Sparse is better than dense.
• Readability counts.
• Special cases aren't special
enough to break the rules.
…
What’s Python
How Python looks like
Make Python ready
Make yourself ready
Get breadcrumb list
How Python looks like
Interactive shell - Windows
• Just run `python`
Interactive shell - Unix
• Just run `python` or `python3`
Version infoType any codes you want to run
How Python looks like
Script
1. Create e.g. `script.py` file
2. Save it as UTF-8 text file
Command line interface
• Run `python script.py`
No logo output by default
What’s Python
How Python looks like
Let’s set up Python
Make Python ready
Make yourself ready
Get breadcrumb list
Let’s set up Python
Windows / Mac OS X
1. Download installer
2. Double-click installer
Windows
-> Add Python to PATH
Mac OS X
-> Do NEVER fix system Python
3. Complete installation
Linux (Debian/Ubuntu)
1. Retrieve packages list
apt-get update
2. Install Python 3.x
apt-get install python3
3. Install pip
apt-get install python3-pip
Where’s standard location on Windows?
`C:¥Python35` and `C:¥Python35-x64` are typical path IMHO
pip and ipython
• pip … Package manager in Python
• Packages are on public repository similarly with apt, ppm, npm, etc
• ipython … Enhanced interactive shell
• [TAB] -> completion
• `?` -> help
• `??` -> see source
• `_` -> last output
• Auto indentation, [Ctrl]+c capturing, search ([Ctrl]+r), etc
Let’s install ipython using pip
1. Ensure connectivity to the Internet
2. Type `pip install ipython`
3. Hit [Enter]
…
What’s Python
How Python looks like
Let’s set up Python
“Hello world!”
✓Make Python ready
Make yourself ready
Get breadcrumb list
“Hello world!”
1. Run `python` or `ipython`
2. Type `print(“Hello world!”)`
3. Hit [Enter]
How Python looks like
Let’s set up Python
“Hello world!”
Do basic practices
✓Make Python ready
Make yourself ready
Get breadcrumb list
Differentiations from C style
1. `:` + indentation instead of `{ … }`
2. Pascal-like operators -> `and` `or` `not`
3. Bash-like comment -> starting with `#`
4. No difference between `’` and `”`
5. No need to put `;` at the end of line
sample.py sample.c
Do basic practices – if … elif … else
1. Run `ipython`
2. Type code(s)
3. Hit [Enter]
Do basic practices – list, len(…)
1. Run `ipython`
2. Type code(s)
3. Hit [Enter]
Do basic practices – for … in …, range(…)
1. Run `ipython`
2. Type code(s)
3. Hit [Enter]
Do basic practices – while …, import
1. Run `ipython`
2. Type code(s)
3. Hit [Enter]
Do basic practices – open, “…”, b”…”
1. Run `ipython`
2. Type code(s)
3. Hit [Enter]
str object v.s. bytes object
str – String
"text"
bytes – Binary data
b"¥x74¥x65¥x78¥x74"
(= b"text")
"text".encode()
b"text".decode()
Do basic practices – open, “…”, b”…”
1. Run `ipython`
2. Type code(s)
3. Hit [Enter]
Do basic practices – urlopen
1. Run `ipython`
2. Type code(s)
3. Hit [Enter]
Let’s set up Python
“Hello world!”
Do basic practices
Your first scripting
✓Make Python ready
✓Make yourself ready
Get breadcrumb list
Your first scripting
• I am going to write dummy Web server.
• My script will do:
• Listen on 80/tcp.
• Accept incoming connections.
• Respond random number of words.
• You are going to write HTTP client.
• Your script will do:
• Access server via HTTP.
• Read content from response object. <- How to decode binary data?
• Split content by white space. <- How to split string?
• Print how many words in response. <- How to count list of strings?
“Hello world!”
Do basic practices
Your first scripting
Study materials
✓Make Python ready
✓Make yourself ready
Get breadcrumb list
Study materials
• The Python Tutorial
• Describes all you need to know about Python
• Learn Python the Hard Way
• Gives practical tasks to make you able to write Python codes
• GitHub
• Guides how you should write well-mannered Python codes
Congratulations!! 
✓Make Python ready
✓Make yourself ready
✓Get breadcrumb list
Thank you for your participation.
Open Kahoot! - https://kahoot.it

More Related Content

What's hot

Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
Kanchilug
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
Srinivas Narasegouda
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
KrishnaMildain
 
Intro to Python for Non-Programmers
Intro to Python for Non-ProgrammersIntro to Python for Non-Programmers
Intro to Python for Non-Programmers
Ahmad Alhour
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Maulik Borsaniya
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
ismailmrribi
 
Python final ppt
Python final pptPython final ppt
Python final ppt
Ripal Ranpara
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
Dipankar Achinta
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
Kamal Acharya
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
Vijay Chaitanya
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Agung Wahyudi
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
Swarit Wadhe
 
Get started python programming part 1
Get started python programming   part 1Get started python programming   part 1
Get started python programming part 1
Nicholas I
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
St. Petersburg College
 
Python Basics.pdf
Python Basics.pdfPython Basics.pdf
Python Basics.pdf
FaizanAli561069
 
Programming
ProgrammingProgramming
Programming
monishagoyal4
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
Paige Bailey
 
Python by Rj
Python by RjPython by Rj

What's hot (20)

Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Intro to Python for Non-Programmers
Intro to Python for Non-ProgrammersIntro to Python for Non-Programmers
Intro to Python for Non-Programmers
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Python final ppt
Python final pptPython final ppt
Python final ppt
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Get started python programming part 1
Get started python programming   part 1Get started python programming   part 1
Get started python programming part 1
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
 
Python Basics.pdf
Python Basics.pdfPython Basics.pdf
Python Basics.pdf
 
Programming
ProgrammingProgramming
Programming
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
 
Python by Rj
Python by RjPython by Rj
Python by Rj
 

Viewers also liked

Asynchronous I/O in Python 3
Asynchronous I/O in Python 3Asynchronous I/O in Python 3
Asynchronous I/O in Python 3
Feihong Hsu
 
Introduction to the basics of Python programming (part 3)
Introduction to the basics of Python programming (part 3)Introduction to the basics of Python programming (part 3)
Introduction to the basics of Python programming (part 3)
Pedro Rodrigues
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
Tahani Al-Manie
 
Intro to Python
Intro to PythonIntro to Python
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101
Tim Penhey
 
Python Intro
Python IntroPython Intro
Python Intro
Tim Penhey
 
Mastering Python 3 I/O (Version 2)
Mastering Python 3 I/O (Version 2)Mastering Python 3 I/O (Version 2)
Mastering Python 3 I/O (Version 2)
David Beazley (Dabeaz LLC)
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
Laxman Puri
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
amiable_indian
 
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
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
Nowell Strite
 

Viewers also liked (11)

Asynchronous I/O in Python 3
Asynchronous I/O in Python 3Asynchronous I/O in Python 3
Asynchronous I/O in Python 3
 
Introduction to the basics of Python programming (part 3)
Introduction to the basics of Python programming (part 3)Introduction to the basics of Python programming (part 3)
Introduction to the basics of Python programming (part 3)
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101
 
Python Intro
Python IntroPython Intro
Python Intro
 
Mastering Python 3 I/O (Version 2)
Mastering Python 3 I/O (Version 2)Mastering Python 3 I/O (Version 2)
Mastering Python 3 I/O (Version 2)
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction 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
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 

Similar to Introduction to python 3

Introduction to python 3 2nd round
Introduction to python 3   2nd roundIntroduction to python 3   2nd round
Introduction to python 3 2nd round
Youhei Sakurai
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
Arpittripathi45
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
SugumarSarDurai
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
MohammadSamiuddin10
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
MohammadSamiuddin10
 
python into.pptx
python into.pptxpython into.pptx
python into.pptx
Punithavel Ramani
 
chapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptxchapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptx
aniruddhmishra2007
 
Welcome_to_Python.pptx
Welcome_to_Python.pptxWelcome_to_Python.pptx
Welcome_to_Python.pptx
21M220KARTHIKEYANC
 
PyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 TutorialPyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 Tutorial
Justin Lin
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
gmadhu8
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
Shivam Gupta
 
Python
PythonPython
Python
Shivam Gupta
 
python intro and installation.pptx
python intro and installation.pptxpython intro and installation.pptx
python intro and installation.pptx
adityakumawat625
 
chapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptxchapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptx
Jahnavi113937
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
Gnanesh12
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
Eran Shlomo
 
1B-Introduction_to_python.ppt
1B-Introduction_to_python.ppt1B-Introduction_to_python.ppt
1B-Introduction_to_python.ppt
AmritMarwaha1
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
gabriellekuruvilla
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
VaibhavKumarSinghkal
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
Ahmet Bulut
 

Similar to Introduction to python 3 (20)

Introduction to python 3 2nd round
Introduction to python 3   2nd roundIntroduction to python 3   2nd round
Introduction to python 3 2nd round
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python into.pptx
python into.pptxpython into.pptx
python into.pptx
 
chapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptxchapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptx
 
Welcome_to_Python.pptx
Welcome_to_Python.pptxWelcome_to_Python.pptx
Welcome_to_Python.pptx
 
PyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 TutorialPyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 Tutorial
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
Python
PythonPython
Python
 
python intro and installation.pptx
python intro and installation.pptxpython intro and installation.pptx
python intro and installation.pptx
 
chapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptxchapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptx
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
1B-Introduction_to_python.ppt
1B-Introduction_to_python.ppt1B-Introduction_to_python.ppt
1B-Introduction_to_python.ppt
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
 

Recently uploaded

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 

Recently uploaded (20)

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 

Introduction to python 3

  • 1. Introduction to Python 3 “Your first scripting in Python 3.x” workshop Youhei Sakurai, TC, CSS, YSJ APAC-EU time zone, 30th September, 2016
  • 2. Youhei Sakurai • Intermediate Pythonista • Started to learn Python in 2010. • Have been introducing Python several times since 2011. • Publishing one package on PyPI – PyMemoryModule. • My name is written in change log of lxml 3.6.0. 
  • 3. Rules • Will finish on time even if some of topics are not completed. • Turn on your web-cam to enhance your active involvement. • Raise your questions to drive bi-directional communication. • If it is beyond beginner’s level, I’d suggest to have separate call. • If there’re too many, I’d select rather important ones for everyone. • Stay sharp with your text editor and Python installer.
  • 4. Agenda • What’s Python • How Python looks like • Let’s set up Python • “Hello world!” • Do basic practices • Your first scripting • Study materials • Kahoot quiz
  • 5. Goals • Make Python ready on your workstation. • Make yourself ready in the Python 3.x Ocean. • Get breadcrumb list to learn Python 3.x. • And... Let you get high score at Kahoot quiz. 
  • 6. What’s Python Make Python ready Make yourself ready Get breadcrumb list
  • 7. What’s Python • One of programing languages like Java, C, Perl, Ruby, etc • No compilation, no type definitions, no magic, no callback hell • Well documented, cross platform, multi-purpose glue language • Used in Amazon, Google, Yahoo, Dropbox, NASA, etc OK, but why Python?
  • 8. Why Python • Batteries included • Web server, database, GUI, networking, regex, XML, JSON, archiving, C/C++ integration, package manager, async I/O, serialization, etc. • Not a toy, powerful enough • Can write anything from one tiny script to large scaled enterprise application. • Defacto standard language in IT industry • Even I can write Python codes better than English email.  Sounds like none of my business…
  • 9. Why Python for you • Python runs anywhere • You can carry the most professional toolset everywhere • Python makes sense very well So, is Python perfect?
  • 10. A few disadvantages in Python • Slower than C/C++ and assembly • No JIT (Just-In-Time) compiler equipped in CPython • GIL (Global Interpreter Lock) prevents real parallelism in CPython • Jython and IronPython falls much behind CPython Who cares?
  • 11. So what’s Python… Python is the professional toolset never ever invented before!!
  • 12. A bit more about Python History of Python • Created in 1989 by Guido Van Rossum • Python 1.0 released in 1994 • Python 2.0 released in 2000 • Python 3.0 released in 2008 • Python 2.7 released in 2010 • Python 3.5 released in 2015 • No Python 2.8 planned (*1) • EOL of Python 2.7 planed in 2020 (*2) *1 … PEP 404, *2 … PEP 373 Zen of Python (by Tim Peters) • Beautiful is better than ugly. • Explicit is better than implicit. • Simple is better than complex. • Complex is better than complicated. • Flat is better than nested. • Sparse is better than dense. • Readability counts. • Special cases aren't special enough to break the rules. …
  • 13. What’s Python How Python looks like Make Python ready Make yourself ready Get breadcrumb list
  • 14. How Python looks like Interactive shell - Windows • Just run `python` Interactive shell - Unix • Just run `python` or `python3` Version infoType any codes you want to run
  • 15. How Python looks like Script 1. Create e.g. `script.py` file 2. Save it as UTF-8 text file Command line interface • Run `python script.py` No logo output by default
  • 16. What’s Python How Python looks like Let’s set up Python Make Python ready Make yourself ready Get breadcrumb list
  • 17. Let’s set up Python Windows / Mac OS X 1. Download installer 2. Double-click installer Windows -> Add Python to PATH Mac OS X -> Do NEVER fix system Python 3. Complete installation Linux (Debian/Ubuntu) 1. Retrieve packages list apt-get update 2. Install Python 3.x apt-get install python3 3. Install pip apt-get install python3-pip
  • 18. Where’s standard location on Windows? `C:¥Python35` and `C:¥Python35-x64` are typical path IMHO
  • 19. pip and ipython • pip … Package manager in Python • Packages are on public repository similarly with apt, ppm, npm, etc • ipython … Enhanced interactive shell • [TAB] -> completion • `?` -> help • `??` -> see source • `_` -> last output • Auto indentation, [Ctrl]+c capturing, search ([Ctrl]+r), etc
  • 20. Let’s install ipython using pip 1. Ensure connectivity to the Internet 2. Type `pip install ipython` 3. Hit [Enter] …
  • 21. What’s Python How Python looks like Let’s set up Python “Hello world!” ✓Make Python ready Make yourself ready Get breadcrumb list
  • 22. “Hello world!” 1. Run `python` or `ipython` 2. Type `print(“Hello world!”)` 3. Hit [Enter]
  • 23. How Python looks like Let’s set up Python “Hello world!” Do basic practices ✓Make Python ready Make yourself ready Get breadcrumb list
  • 24. Differentiations from C style 1. `:` + indentation instead of `{ … }` 2. Pascal-like operators -> `and` `or` `not` 3. Bash-like comment -> starting with `#` 4. No difference between `’` and `”` 5. No need to put `;` at the end of line sample.py sample.c
  • 25. Do basic practices – if … elif … else 1. Run `ipython` 2. Type code(s) 3. Hit [Enter]
  • 26. Do basic practices – list, len(…) 1. Run `ipython` 2. Type code(s) 3. Hit [Enter]
  • 27. Do basic practices – for … in …, range(…) 1. Run `ipython` 2. Type code(s) 3. Hit [Enter]
  • 28. Do basic practices – while …, import 1. Run `ipython` 2. Type code(s) 3. Hit [Enter]
  • 29. Do basic practices – open, “…”, b”…” 1. Run `ipython` 2. Type code(s) 3. Hit [Enter]
  • 30. str object v.s. bytes object str – String "text" bytes – Binary data b"¥x74¥x65¥x78¥x74" (= b"text") "text".encode() b"text".decode()
  • 31. Do basic practices – open, “…”, b”…” 1. Run `ipython` 2. Type code(s) 3. Hit [Enter]
  • 32. Do basic practices – urlopen 1. Run `ipython` 2. Type code(s) 3. Hit [Enter]
  • 33. Let’s set up Python “Hello world!” Do basic practices Your first scripting ✓Make Python ready ✓Make yourself ready Get breadcrumb list
  • 34. Your first scripting • I am going to write dummy Web server. • My script will do: • Listen on 80/tcp. • Accept incoming connections. • Respond random number of words. • You are going to write HTTP client. • Your script will do: • Access server via HTTP. • Read content from response object. <- How to decode binary data? • Split content by white space. <- How to split string? • Print how many words in response. <- How to count list of strings?
  • 35. “Hello world!” Do basic practices Your first scripting Study materials ✓Make Python ready ✓Make yourself ready Get breadcrumb list
  • 36. Study materials • The Python Tutorial • Describes all you need to know about Python • Learn Python the Hard Way • Gives practical tasks to make you able to write Python codes • GitHub • Guides how you should write well-mannered Python codes
  • 37. Congratulations!!  ✓Make Python ready ✓Make yourself ready ✓Get breadcrumb list
  • 38. Thank you for your participation. Open Kahoot! - https://kahoot.it