What Is Python?
Python is an easy-to-learn, powerful general-purpose programming language, deliberately designed so a learner can focus on solving a problem rather than fighting the language's own rules.
A Language for Solving Problems
Python is an easy-to-learn, powerful, general-purpose programming language. It was deliberately designed so that a learner can concentrate on solving a problem instead of spending most of the effort fighting the language's own rules.
The description of Python contains two complementary ideas. First, Python is approachable: it is intended to be easy to learn. Second, it is powerful and general-purpose: it is not limited to one narrowly defined kind of programming problem. The design goal is to keep the language from becoming the main obstacle between the learner and the problem they are trying to solve.
Following the Learner's Focus
Where should the learner's attention go?
Imagine a beginner preparing to write a Python program. Compare two possible learning experiences: one in which the learner is mainly occupied with the language's rules, and one in which the learner can concentrate on the programming problem.
Starting point: The learner has a problem they want to solve and needs to express a solution in a programming language.
Possible obstacle: If the language's rules become the main difficulty, the learner's attention is pulled away from the original problem.
Python's design goal: Python is deliberately designed to help the learner focus on solving the problem rather than fighting the language's own rules.
Result: The language supports the learner's problem-solving focus instead of becoming the central challenge.
Python's intended learning experience puts the programming problem at the center and reduces the distraction caused by complex language rules.
Writing Python Source Files
Python itself is the programming language. To create Python source files, you need editor software in which you can type and save the files. The editor is therefore a tool used to write programs; it is not the definition of Python.
The choice of editor can affect how comfortably you write Python programs. A good programmer's editor can make writing source files easier and help you reach your goal more comfortably, quickly, and safely. One basic feature to look for is syntax highlighting, which colorizes different parts of a Python program so that you can see the program more clearly and visualize its running.
| Item | Role |
|---|---|
| Python | The easy-to-learn, powerful, general-purpose programming language |
| Editor software | The tool used to type and save Python source files |
| Syntax highlighting | An editor feature that colorizes different parts of a Python program |
Choosing a First Editor
Beginners can start with Light Table and keep their attention on learning Python rather than learning an editor at the same time. Experienced programmers may already use Vim or Emacs, which the source describes as powerful editors for writing Python programs. The practical principle is to choose an editor that supports your current learning goal.
Mistakes Beginners Make
Treating Python and the editor as the same thing
Python is the programming language, while the editor is the tool used to create Python source files.
Fix:
Keep the roles separate: use an editor to write and save Python programs.Assuming that an easy-to-learn language must be weak
The source describes Python as both easy-to-learn and powerful, and identifies it as general-purpose.
Fix:
Remember both sides of Python's identity: approachable for learners and powerful for general-purpose programming.Ignoring editor features that improve visibility
Syntax highlighting colorizes different parts of a Python program and helps the learner see the program more clearly.
Fix:
Treat syntax highlighting as a useful basic editor feature when choosing a tool for writing Python.
Check Your Understanding
In your own words, explain what Python is and describe how an editor supports the process of writing a Python program.
Hints
- Include Python's three main descriptions: easy-to-learn, powerful, and general-purpose.
- Explain the difference between a programming language and editor software.
- Mention the purpose of syntax highlighting.
What do you think happens?
A beginner wants to learn Python but is spending most of their time learning a complicated editor. Based on Python's intended learning experience, what should be the better focus?
Reveal answer
Answer: Focus first on Python and use an editor that supports writing source files
The source recommends that beginners focus their learning on Python rather than the editor at that moment. The editor should support the learner's work, not replace the main learning goal.
The Essential Definition
- Python is an easy-to-learn, powerful, general-purpose programming language.
- Its design aims to let learners focus on solving problems instead of fighting the language's own rules.
- An editor is software used to type and save Python source files.
- Syntax highlighting is a useful editor feature that colorizes different parts of a Python program.
- Beginners can keep their attention on Python while using an editor that supports their current learning needs.
Key Takeaways
- Python is an easy-to-learn, powerful, general-purpose programming language.
- Python is designed to help learners concentrate on solving problems rather than fighting complex language rules.
- Editor software is used to type and save Python source files; it is separate from Python itself.
- Syntax highlighting helps learners see and distinguish parts of a Python program.
- Beginners can choose a supportive editor without making editor mastery the main learning goal.