Skip to content

Commit 0c896e2

Browse files
Gaurav Sitlanibhavin192
Gaurav Sitlani
authored andcommitted
Added The Zen of Python (#4)
* Added The Zen of Python * removed python interpreter version. * changes removed #python * conflict resolved. * changes * blank space removed. * zen of python change
1 parent 624bbbb commit 0c896e2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

file_and_modules.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,31 @@
4141
* We can import a module using `import` keyword.
4242
* If it is not available it will give import error.
4343
* dir() method tells what the attribute provides.
44+
* What's The [Zen](https://www.python.org/dev/peps/pep-0020/) of Python ?
4445
```
46+
>>> import this
47+
The Zen of Python, by Tim Peters
48+
49+
Beautiful is better than ugly.
50+
Explicit is better than implicit.
51+
Simple is better than complex.
52+
Complex is better than complicated.
53+
Flat is better than nested.
54+
Sparse is better than dense.
55+
Readability counts.
56+
Special cases aren't special enough to break the rules.
57+
Although practicality beats purity.
58+
Errors should never pass silently.
59+
Unless explicitly silenced.
60+
In the face of ambiguity, refuse the temptation to guess.
61+
There should be one-- and preferably only one --obvious way to do it.
62+
Although that way may not be obvious at first unless you're Dutch.
63+
Now is better than never.
64+
Although never is often better than *right* now.
65+
If the implementation is hard to explain, it's a bad idea.
66+
If the implementation is easy to explain, it may be a good idea.
67+
Namespaces are one honking great idea -- let's do more of those!
68+
4569
>>> import math
4670
>>> dir(math)
4771
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'inf', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'log2', 'modf', 'nan', 'pi', 'pow', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau', 'trunc']

0 commit comments

Comments
 (0)