Home > Software engineering >  need to print all rows
need to print all rows

Time:01-04

for row in rows[:5]:

This will give me the first 5 rows. lets say I have a thousands rows - how can I print them all - what should I use between the square brackets ?

I am trying to print all rows but I am looking for something that will print the whole file regardless how big it is by default.

CodePudding user response:

You can just write

for row in rows:
    ...

no need to apply a slice

  • Related