Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
This Was Hard. And I mean it. solution in Clear category for I Love Python! by Safwan_Samsudeen
#
#
#
#
#
#
#
#
def i_love_python():
"""
WHY I LIKE PYTHON:
It's easy to read.
It's easy to write.
It has lots of useful built-in functions.
Python's way of handling iterables is... undescribably great.
Python's way of handling classes is great too.
The Python community is really helpful.
This may sound like a silly reason, but the traceback in Python really
helps me debug.
It uses brackets a lot less than other languages (you don't need
brackets in if statements, for example).
Another silly reason. It's bools are capitalized.
And a few million other reasons which I don't have the brain power to
think of currently
WHAT PYTHON COULD(SHOULD) IMPROVE ON
It's slow. This isn't too much of a problem when I code, but it is a
big problem when I have debates about which programming language is
the best. Worse, it pushes the big shots off the language.
It gives too much ABSOLUTELY UNNECESSERY errors.
It's amazingly hard to uninstall. Again, this isn't too much of a
problem, but I currently have like around 4 versions of Python on my
system. If I continue developing in the next few years, I'll have 10
or so I guess, along with Anaconda and stuff.
Trivial point: For chaps who say that 'There should be one - and
preferably only one - obvious way to do it.', they have too many
ways to do a some things. I guess it's there
for compatibility between versions, but I think they should assume
that Python 2 developers don't use Python 3. Cut it off, I hope that
there won't be four different ways to do string formatting in Python 4.
Not much more. I mean, there are a few more small things, but that's
okay.
IMPORTANT P.S. - I hope there were no spelling errors. English was never my
strongest subject, which, by the way, is one of the reasons I switched to
Python. Also, if you were wondering why my lines are so short, it's
because of my linter, which doesn't allow any lines where len(line) > 79
"""
return "I love Python!"
def test():
assert i_love_python() == "I love Python!"
if __name__ == '__main__':
i_love_python()
test()
Nov. 25, 2020