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
How to create Photography Database For Clients ? Software etc...
AdWords - Your Google Account Management Team
Is there a better way to write formula than use a nested if statement?
#VALUE! error in Excel 2007
How important is 'domain age' in google rankings.
How to setup All Users Shortcut to run in Windows 95 compatibility mode for Terminal Services on Server 2003
How can I get this adware off of my computer without paying the pirates?
MSCONFIG SAFE MODE TO MINIMAL BUT NO PASSWORD WORKS
How can I get a value to show in a combobox.dropdownlist?
recreating a logo