Hello!
I have a challenge with postal code ranges, I'm hoping that someone out there will be able to help me with this.
I have a file that gives Canadian cities with their postal codes, but the postal codes are in ranges. I need to convert the format to fill in the ranges, so I have the city listed on multiple rows with a unique postal code for each row.
Example
Input
Toronto, ON M1A1A1 M9Z9Z9
Desired Output
Toronto, ON M1A1A1
Toronto, ON M1A1A2
...
Toronto, ON M1A1A9
Toronto, ON M1A1B0
Toronto, ON M1A1B1
etc, etc.
To make this even more challenging, Canada Post does not use certain letters, so they will need to be excluded. These letters are D, F, I, O, Q, and U.
I have no idea how to approach this, so any help would be much appreciated!
Thank you
I have a challenge with postal code ranges, I'm hoping that someone out there will be able to help me with this.
I have a file that gives Canadian cities with their postal codes, but the postal codes are in ranges. I need to convert the format to fill in the ranges, so I have the city listed on multiple rows with a unique postal code for each row.
Example
Input
Toronto, ON M1A1A1 M9Z9Z9
Desired Output
Toronto, ON M1A1A1
Toronto, ON M1A1A2
...
Toronto, ON M1A1A9
Toronto, ON M1A1B0
Toronto, ON M1A1B1
etc, etc.
To make this even more challenging, Canada Post does not use certain letters, so they will need to be excluded. These letters are D, F, I, O, Q, and U.
I have no idea how to approach this, so any help would be much appreciated!
Thank you