Question: How do you solve this Python problem? Create a python program to do the following: 1. Create a function that would write to a file,
How do you solve this Python problem?

Create a python program to do the following: 1. Create a function that would write to a file, Assignment4.txt, the following lines (Ensure that the text would have the same format as below): Player Name MinsPlayed Goals Assists Yellow Card Lionel Messi 1943 19 4 4 Robert Lewandowski 1864 28 6 2 Harry Kane 2017 14 11 1 Jack Grealish 1977 6 10 6 Cristiano Ronaldo 1722 19 3 1 Zlatan Ibrahimovic 1102 14 1 2 Gerard Moreno 1735 14 2 3 Romelu Lukaku 1774 18 6 4 Kylian Mbappe 1706 18 6 3 Erlin Haaland 1542 17 4 2 a. Once the data is written in the text, close the file. 2. Create another function that would read the file you just created with the following info. Convert the data in the file into a list and close the file. Then do the following: Print all the players that played more than 1700 minutes. b. Print all the players that have more than 8 goals. Print all player name Ronaldo if it exists. d. Print player name Kane if it exists. 3. Create another function that would parse the file so it would only print the names of the players. c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
