Write a fn collateATPFiles(openType, openPoints) that takes the pathname of the two text files collates them and returns the content of the files
I have to raise value error for the following -
- The file openType does not contain at least two entries per line (for lines that do not start with #).
- The file openPoints has a tournament type not defined in openType and vice-versa
- The file openPoints does not contains exactly 4 entries per line, or if the second, third or fourth entries are not numerical values of type int.
This is my code so far-
def collateATPFiles(openType, openPoints):
f1=open('openType')
f2=open('openPoints')
readinfo1=f1.readline()
readinfo2=f2.readline()
if f1 not in readinfo1<=2:
raise ValueError
source https://stackoverflow.com/questions/73338439/write-a-fn-collateatpfilesopentype-openpoints-that-takes-the-pathname-of-the
Comments
Post a Comment