tony75
10
Newbie Poster
Recommended Answers
Jump to PostWhat how have you tried to do it?
Post your code and we can see what is your problem
Tony
Jump to Postimport glob print "\n\n".join(["".join([l for l in open(inf).readlines()[:2]]) for inf in glob.glob("C:\\path\\to\\the\\dir\\*.txt")])
All 5 Replies
TrustyTony
888
pyMod
Team Colleague
Featured Poster
tony75
10
Newbie Poster
South
0
Newbie Poster
jice
53
Posting Whiz in Training
TrustyTony
888
pyMod
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.