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
Linked Sharepoint List in Access 2007, read only?
SELECTs from a temporary table and NOLOCKs
Recipe Database
Worm Spreading rapidly on network
How to execute a batch at Windows startup?
500 Points... INSTALL cURL on CENTOS 3
looping a script? AS3 Flash, Actionscript 3
Importing a .pst into a public folder, I can see all the contents, other users only see "Deleted Items" folder.
Datediff - average
Backup Data Transfer causes NIC messages?