A survey of more than 20,000 Python users indicates that overall Python use is still growing among developers and that data analysis (including machine learning) is now the main use case. Python is also preferred for use in web development, testing, and automation.

Here is an excerpt from an article in InfoWorld:

Of the Python developers surveyed, 84 percent said Python was their chief development language, with 50 percent citing JavaScript as their second choice. That HTML/CSS took third place at 47 percent hints at Python’s major role in building web applications—be they public-facing websites, private apps, or desktop apps equipped with a web front end (e.g., Electron).

[…]

Growth of Python 3 usage has been steady year-over-year since 2013, but the implication is that some margin of users will continue working with it right up to its end-of-life in 2020. The survey didn’t probe into why developers stick with Python 2, whether it’s the weight of legacy code, institutional requirements, or simply developer preference.

Some 52 percent of respondents listed web development as their main Python task. When respondents were asked to identify a single use case, rather than all of their Python use cases, web development topped the list at 27 percent. The survey also revealed that Flask (47 percent) and Django (45 percent) were by far the most widely used Python web frameworks.

Data analysis — the task Python has become most broadly associated with in recent years — was cited by 58 percent one of their Python use cases. There, packages like NumPy (62 percent), Pandas (51 percent), Matplotlib (46 percent), and SciPy (38 percent) rule the roost. A related field, machine learning, figured in at 38 percent of users, with TensorFlow (25 percent) being the most commonly used machine learning framework. Of the big data tools for Python, Apache Spark (12 percent) was the easy winner.