Quine in Python:

It is a program that takes no input, but it outputs a copy of its own code. In Python for data science, the shortest possible quine is a single line of code.

What is Quine in Python for Data Science - PST Analytics

In Python 3:

What is Quine in Python for Data Science - PST Analytics

The above code is an example of string formatting.

We may consider the below code as the smallest,

But the above program is not a quine as it uses open() function for printing its own source code.

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.