~ To run this script, you can save it to a file (e.g. merge_subdomains.py) and then run it with the following command:
$ python merge_subdomains.py
or
$ python3 merge_subdomains.py
~ You can replace the subdomains list in the script with your own list of subdomains.