I've got a program that needs to take a text file as input and do a few things with each line of code. 

Before i can do anything with the text file though, i need to ensure that every line matches a specific format which in this case, would be city name (which could be any string, it wouldn't need to be a real city name) followed by a ',' followed by a number.

a typical line would look like this:

> 
> towna,2.43
> 
> 
> 

This is what I have at the moment, it works in terms of making the program function but it doesn't verify that the data is correct, so if its wrong (and it will be from time to time) its going to give me an error. I read some stuff about re.match, but I don't understand how to use it.

```
def read_file(fileName):
    weatherFile = open(fileName)
    for line in weatherFile:
        stripped =  line.replace(' ','')
        pass #add data validation for file
        town, rain  = stripped.split(",")
        if checkIfExists(town):
            dataList.append({"city":town, "average_rainfall":float(rain.rstrip())})
        else:
            print("It looks like {0} is on the list twice.  Please ensure all towns in {1}  only appear once and try again." .format(town, fileName))
            break

```