Implement the generator function txt_to_dict(), which takes no arguments.
The function should return a generator that generates a sequence of dictionaries, each containing information about the next planet from the planets.txt file, namely its name, diameter, mass, and orbital period. For example:
A planets.txt file containing information about the various planets is available to you. https://github.com/Mutaf-Volodymyr/290724-ptm/blob/main/txt_to_dict/planets.txt
Implement the generator function txt_to_dict(), which takes no arguments.
The function should return a generator that generates a sequence of dictionaries, each containing information about the next planet from the planets.txt file, namely its name, diameter, mass, and orbital period. For example:
{‘Name’: ‘Mercury’, ‘Diameter’: ‘4879.4’, ‘Mass’: ‘3.302×10^23’, ‘OrbitalPeriod’: ‘0.241’}