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
In Flash Populate a Combo box Component with data from a MySQL database
Acer OS boot Partition has gone loopy
read bmp picture into a variable
Find all the printers installed on all the machines in the file
NLS_LANG Turkish support problem
Internet Explorer toggle button for Proxy server enable/disable
Windows 7 Freezes when screen saver is on
No Free/busy information could be retrieved for certain users
UK bank account number and sortcode checking algorithm needed
scroll position javascript