Hi all, hope you are well. Just a quick one here that you pythons will be able to answer in no time (I am new with python). What I am trying to do is read a text file and print only the first and last line of that file. Any ideas as to how I might go about this ? I have read the file so all i need to do is find a way of finding out which is first and last line, and then printing them. Thanks for your time.
majestic0110 187 Nearly a Posting Virtuoso
majestic0110 187 Nearly a Posting Virtuoso
majestic0110 187 Nearly a Posting Virtuoso
majestic0110 187 Nearly a Posting Virtuoso
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.