Skip to content

Commit 7c8934b

Browse files
committed
Add a simple Python Explorer script to print the Zen of Python
1 parent 3299363 commit 7c8934b

File tree

3 files changed

+66
-2
lines changed

3 files changed

+66
-2
lines changed

README.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,55 @@
1-
# python-explorer
2-
Python Explorer
1+
# Python Explorer - A Simple Starting Template
2+
3+
This repository contains a simple Python script that outputs the Zen of Python, a set of guiding principles for writing Pythonic code. This can be used as a starting point for exploring Python or as a lightweight template for new projects.
4+
5+
## How to Use
6+
7+
1. Clone this repository:
8+
```bash
9+
git clone https://github.com/LahcenEzzara/python-explorer.git
10+
cd python-explorer
11+
```
12+
13+
2. Run the script:
14+
```bash
15+
python main.py
16+
```
17+
18+
3. The script will display the Zen of Python in your terminal.
19+
20+
## Example Output
21+
22+
When you run the script, you'll see:
23+
24+
```
25+
The Zen of Python, by Tim Peters
26+
27+
Beautiful is better than ugly.
28+
Explicit is better than implicit.
29+
Simple is better than complex.
30+
Complex is better than complicated.
31+
Flat is better than nested.
32+
Sparse is better than dense.
33+
Readability counts.
34+
Special cases aren't special enough to break the rules.
35+
Although practicality beats purity.
36+
Errors should never pass silently.
37+
Unless explicitly silenced.
38+
In the face of ambiguity, refuse the temptation to guess.
39+
There should be one-- and preferably only one --obvious way to do it.
40+
Although that way may not be obvious at first unless you're Dutch.
41+
Now is better than never.
42+
Although never is often better than *right* now.
43+
If the implementation is hard to explain, it's a bad idea.
44+
If the implementation is easy to explain, it may be a good idea.
45+
Namespaces are one honking great idea -- let's do more of those!
46+
```
47+
48+
## Why Use This?
49+
50+
- **Simplicity**: The script demonstrates how to run a Python program and interact with core Python features.
51+
- **The Zen of Python**: These principles serve as an excellent introduction to Python's philosophy and best practices.
52+
53+
## License
54+
55+
This repository is available under the [MIT License](LICENSE). Feel free to use it as a starting point for your projects!

main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Python Explorer - A Simple Starting Template
2+
3+
def main():
4+
import this # Outputs the Zen of Python
5+
6+
7+
if __name__ == "__main__":
8+
main()

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Example dependencies (if you add any)
2+
numpy
3+
pandas

0 commit comments

Comments
 (0)