Почему стоит выбрать Python

Николай Сасковец

👫 + 🐍 = 🚀

Николай Сасковец

+ 🐍 = 🚀

Николай Сасковец

Top 5! Everywhere!

Stackoverflow (2018)
  1. JavaScript
  2. SQL
  3. Java
  4. Bash/Shell
  5. Python
TIOBE (March 2019)
  1. Java
  2. C
  3. Python
  4. C++
  5. Visual Basic .NET
PYPL (Apr 2019)
  1. Python
  2. Java
  3. JavaScript
  4. C#
  5. PHP
RedMonk (2018)
  1. JavaScript
  2. Java
  3. Python
  4. PHP
  5. C#
HackerRank (2018)
  1. JavaScript
  2. Java
  3. C
  4. Python
  5. C++

«The Incredible Growth of Python»

Данные от Stack Overflow, сентябрь 2017

The Incredible Growth of Python

Данные из Stack Overflow Trends, апрель 2019

Рост популярности Python — заслуга ML/DS?

Данные из Google Trends, на апрель 2019 ‪1 янв. 2004‪1 июл. 2009 г.‬‪1 янв. 2015 г.‬255075100
• Machine Learning   • Data Science   • Python   • JavaScript
‪1 янв. 2004‪1 июл. 2009 г.‬‪1 янв. 2015 г.‬255075100

Используют Python для:

58%52%43%38%37%32%28%27%20%19% 9% 8% 6% 5% 3% 7%Data analysisWeb developmentDevOps / System administration / Writing automation scriptsMachine learningProgramming of web parsers / scrapers / crawlersSoftware testing / Writing automated testsEducational purposesSoftware prototypingNetwork programmingDesktop developmentComputer graphicsEmbedded developmentGame developmentMobile developmentMultimedia applications developmentOther Данные из JetBrains Python Developers Survey 2018

Используют Python в первую очередь для:

29%17%11%10% 7% 4% 4% 3% 3% 3% 1% 1% 1% 0% 0% 5%Web developmentData analysisMachine learningDevOps / System administration / Writing automation scriptsEducational purposesDesktop developmentProgramming of web parsers / scrapers / crawlersSoftware prototypingSoftware testing / Writing automated testsNetwork programmingEmbedded developmentGame developmentComputer graphicsMultimedia applications developmentMobile developmentOther Данные из JetBrains Python Developers Survey 2018
27%
Web
development
 ≈
28%
Scientific
development
     
(17% + 11%)
(Data analysis + Machine learning)
Данные из JetBrains Python Developers Survey 2018

Scientific development

Scikit-lear SciPy NumPy pandas Matplotlib Plotly
IPython Jupiter Notebook
TensorFlow PyTorch Keras
Anaconda Conda

Mobile development

BeeWare



Некоторые примеры

Kivy



Примеры проектов

Embedded development

MicroPython

ESP32, ESP8266, CC3200/WiPy, pyboard

Game development

Panda3D, Armory3D, Kivy

FIN

FIN

FIN


>>> from collections import Counter
>>> fruits = ['апельсин', 'банан', 'яблоко', 'апельсин',
              'банан', 'авокадо', 'авокадо', 'авокадо']
>>> Counter(fruits)
Counter({'авокадо': 3, 'апельсин': 2,
         'банан': 2, 'яблоко': 1})

        
   
>>> myvar = 3
>>> myvar += 2
>>> myvar -= 1
>>> mystring = "Hello"
>>> mystring += " world."
>>> print(mystring)
Hello world.
>>> myvar, mystring = mystring, myvar
        
Примеры взяты с https://www.stavros.io/tutorials/python/
>>> sample = [1, ["another", "list"], ("a", "tuple")]
>>> mylist = ["List item 1", 2, 3.14]
>>> mylist[0] = "List item 1 again" # We're changing the item.
>>> mylist[-1] = 3.21 # Here, we refer to the last item.
>>> mydict = {"Key 1": "Value 1", 2: 3, "pi": 3.14}
>>> mydict["pi"] = 3.15 # This is how you change dictionary values.
>>> mytuple = (1, 2, 3)
>>> myfunction = len
>>> print(myfunction(mylist))
        
Примеры взяты с https://www.stavros.io/tutorials/python/
>>> mylist = ["List item 1", 2, 3.14]
>>> print(mylist[:])
['List item 1', 2, 3.1400000000000001]
>>> print(mylist[0:2])
['List item 1', 2]
>>> print(mylist[-3:-1])
['List item 1', 2]
>>> print(mylist[1:])
[2, 3.14]
>>> print(mylist[::2])
['List item 1', 3.14]
        
Примеры взяты с https://www.stavros.io/tutorials/python/