Is there a special method/function to print only first few lines of output in Python 2.7? We know that in terminal we could do that through head -3 for seeing first 3 lines. Do I have to just write a Python for loop? Continue reading...