I already finished another part of the code and get two sets of numbers:
set1(postcode and rents in Western Australia):
[['6004', '240'], ['6004', '350'], ['6004', '350'], ['6004', '315'], ['6004', '490'], ['6004', '280'], ['6004', '275'], ['6004', '240'], ['6050', '260'], ['6050', '330'], ['6050', '220'], ['6050', '250'], ['6000', '390'], ['6000', '220'], ['6000', '400'], ['6000', '250'], ['6000', '320'], ['6000', '390'], ['6000', '220'], ['6000', '400'], ['6004', '395'], ['6004', '230'], ['6004', '350'], ['6004', '300'], ['6004', '300'], ['6004', '340'], ['6000', '420'], ['6000', '190'], ['6000', '300'], ['6000', '380'], ['6000', '270'], ['6000', '380'], ['6000', '350'], ['6000', '380'], ['6004', '360'], ['6004', '450'], ['6004', '200'], ['6004', '250'], ['6004', '350']]
set2(postcodes in set1):
['6004', '6050', '6000']
What I need to do now is to put them in a .csv file like this:
Postcodes are in the frist row (like an index). The rest of the rows are rents in these postcode(example: in postcode 6004, there are 3 houses, the rents are 240,350,350)
What kind of method should I use to get what I want?
I tried dictionary but it says just 2 elements are required.