Interesting Facts about Python:

In the given article, we have compiled a few facts about Python Language for Data Science.

  1. We have a poem in Python written by Tim Peters known as The Zen of Python, which we can read by writing import this in the Python interpreter.

Interesting Facts about Python for Data Science - PST Analytics

  1. Can return multiple values in Python.Interesting Facts about Python for Data Science - PST Analytics
  2. We can use an “else” clause with a “for” loop in Python. It is a special syntax that executes only when the for loop naturally exists without any breaks in the statement.
    Interesting Facts about Python for Data Science - PST Analytics
  3. Python does not support pointers and uses only references.
  4. Another interesting feature of Python is function argument unpacking. We can unpack a list or dictionary as function arguments using * and **. It is known as Splat operator.
  5. Suppose we want to find the index inside a for loop. It is possible by wrapping an iterable with ‘enumerate’ and it will return the required item along with the index.
    Interesting Facts about Python for Data Science - PST Analytics
  6. We can chain comparison operators in Python.
  7. In Python, it is possible to define infinite.
  8. We can build a list more concisely using list comprehension rather than using a loop.
  9. In Python, we have a special Slice operator which can be used for obtaining items from a list or change them.

Interesting Facts about Python for Data Science - PST Analytics

So, to learn more about it in python for data science, you can check this and this as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.