[Tutor] Python Help: Converting a text file into a specified format

Vazquez, Juliana Mary JMV59 at pitt.edu
Sat Mar 28 20:05:30 EDT 2020


Your task is to process each record in a file named “punned_result.txt (see attached) and convert it into the following format:

–[2] Brandt, Mary D; London, Jack E. “Health Informatics Standards: A User’s Guide.” Journal of AHIMA 71, no. 4 (2000): 39-43.

1.    You are required to list all the author names [last_name, first_name initial]

2.    The content in the quotation is the title of the article

3.    Here [2] is the order of the record, 71 is the volume, 4 is the issue number, 2000 is the year of publication, and 39-43 is the start and end pages of the article in that issue of the journal.

Hints:

–You may want to use if/elif/else structure inside a while statement to test the first two characters in each line so that you can determine whether you need the info in that line or not.



Please help me work through this problem!

Thank you!
Juliana
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pubmed_result.txt
URL: <http://mail.python.org/pipermail/tutor/attachments/20200329/8c97ffdc/attachment-0001.txt>


More information about the Tutor mailing list