Question: Python 3 Coding: I am having trouble coding this function correctly. I need a simple solution that ACTUALLY works. I have been trying to find
Python 3 Coding:
I am having trouble coding this function correctly. I need a simple solution that ACTUALLY works. I have been trying to find the solution to this function for a while now so no unecessary solutions please!
read_info_file(filename): This is only one of two functions that deals with reading a file. It accepts the file name as a string, assume it is a CSV file in the format described above for an info file. The function needs to open the file, read all the described pokemon, and create a dictionary of pokemon in the INFO FORMAT. It returns the dictionary it creates. Note: the first line of the file is always a header line which does not corresponds to any pokemon; the last line of the file always ends with a newline (' '). NOTE: DO NOT USE "import csv".
Special case: Name field in the input file might contain one comma as part of the string, for example, "Tornadus, (Incarnate Form)". You can assume the name can have at most one comma and all other fields do not have any comma.
Example CSV File:

Example "info" file ID Name Type 1 Type 2 Generation Legendary 1, "Bulbasaur", Grass Poison" ,1, "FALSE" 6, "Charizard Fire Flying",1 FALSE 4, "Charmander Fire 1, FALSE 169 Crobat Poison Flying" FALSE 146, "Moltres Fire Flying" ,1, "TRUE" 643, "Reshiram", Dragon "Fire",5, ''TRUE 641, "Tornadus, (Incarnate Form) Flying 5 "TRUE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
