Question: portfolio = [ ( ' WMT ' , 1 2 , 1 1 9 . 3 3 , 1 1 9 . 9 9 )
portfolio WMT
AMD
MSFT
F
FB
GE
Write Python code that takes a portfolio as a list of tuples and returns the same portfolio as a python dictionary. The keys are ticker names, and the value for each key is a list as follows:
The first item on the list is the number of shares you own,
The second item on the list is the price you paid when you bought the stocks,
The last item on the list is the current price of the stock.
IN partdportfolio
OUTWMT:
'AMD':
etc
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
