I have a long list of DMS values that look like below.
lst = ['9', '22', '26.9868', 'N',
'118', '23', '48.876', 'E',
'9', '22', '18.6132', 'N',
'118', '23', '5.2188', 'E',
'9', '19', '41.4804', 'N',
'118', '19', '23.1852', 'E']
I want to write this data as a csv file in the following format:

