CODE IN PYTHON:
load(filename, deck): This function will “load” cards from afile (in the format shown above) and put them in the provided deckof cards (an array of dictionaries). Things you’ll need: You needto open, read in, and close the file. Each line of the file isone string which represents a card. Use your knowledge of file I/Oand/or string manipulation to break each line into its componentparts. Take the component parts and make a card out of them. Add the card to the deck provided (this function returns None, youmust manipulate the deck given).
Hints/Tips: We promise the
OR
OR