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
Query columns as well as COUNT of records
The import did not complete because an error occurred.
Curl: how to get httpcode in Bash
Sript problem with IE, IM apps, Control Panel, etc.
Some of my wireless Vista clients don't get IP assigned via DHCP
How to view Trigger in Profiler
pop up window...
Stored Procedure Integer Problem
4th Normalization form
Changed exchange server name - now new profiles automatically trying to connect to old server name