Microsoft
Software
Hardware
Network
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
Google Clique
issue with robocopy marking files as 'Newer'
Windows Xp Hang at Starting , Black Screen after winxp logo , only mouse works - can you help?
Extracting image (.img) file
Running XP Home Edition w/SP 1a. Problem with search screen/windows explorer. Search screen turns on unbidden.
Printers keep changing ports in a terminal server environment
Will google index pages that are not linked within my website?
Need AJAX - Java - Slide Bar to define MIN and MAX Price Range for Product Listing
Microsoft Exchange Server 2000 MBX Deleted?
Validation List VBA - Item index?