Question : skip the header when reading a file

Hi,

just a very short question

for line in open(file):
      line = line.strip().split()
      print line

But it's reading also the header line. How can i skip it in an easy way without using if

Answer : skip the header when reading a file

Oops, missed without if. Ok:
1:
2:
3:
4:
f = open(name)
f.next()
for line in f:
  print line.strip().split()
Open in New Window Select All
Random Solutions  
 
programming4us programming4us