Foundation ========== A foundation wants to carry out a control of the telephone calls of its executives. There is a file of calls such that each line corresponds to an executive and has the following data: the DNI of the executive and the phone numbers he called in the last week, separated by a space. All these data are strings (:class:`str`). An example of this kind of file is file :download:`data_foundation.txt` with the following content: .. literalinclude:: examples/data_foundation.txt :language: console Save all functions in file ``foundation.py``. #. Write the function :py:func:`executive` that takes a line of a file of calls (:class:`str`) with all the data corresponding to an executive, and returns a :class:`tuple` with the following information: DNI (:class:`str`), total number of telephone numbers they have called (:class:`int`) and number of times they have called to Switzerland (:class:`int`). The telephone numbers corresponding to Switzerland begin with '0041'. Examples: .. literalinclude:: test-executive.txt :language: python3 :lines: 3- .. note:: More tests are provided in file :download:`test-executive.txt ` #. Write the function :py:func:`foundation` that takes the name of a file of calls (:class:`str`) and the name of another file (:class:`str`), and writes, in this second file, a line for each executive of the first file that has called to Switzerland. Each line has the executive DNI (:class:`str`) and the number of times he/she has called to Switzerland (:class:`str`), separated by a space. This function must call the previous one. Example: the following statement: .. literalinclude:: test-foundation.txt :language: python3 :lines: 3 uses the given data file ``data_foundation.txt``, and will create a file with the following content: .. literalinclude:: examples/tswitzerland.txt :language: python3 .. note:: More tests are provided in file :download:`test-foundation.txt ` .. rubric:: Solution A solution of these functions is provided in file :download:`foundation.py `