Question: Mr. Charles purchased some mutual funds and created a stack named Original by the ticker symbols of those funds as shown below. Some of those
Mr. Charles purchased some mutual funds and created a stack named Original by the ticker symbols of those funds as shown below. Some of those mutual funds are from Fidelity investments. The ticker symbols of only the Fidelity funds start with the letter F. Write a python code to i) put all the ticker symbols of Fidelity funds of the Original stack in a stack called Fidelity in the same order in which they appeared in the Original stack (FSMEX at the top and FSELX at the bottom) and ii) put all the other ticker symbols in the Original stack in the same order in which they appeared in the Original stack (CPOAX at the top and JAMFX at the bottom)
from array_stack import ArrayStack as AS Original = AS() Fidelity = AS() Helper = AS() Original.push('JAMFX') Original.push('FSELX') Original.push('FOCPX') Original.push('AFOIX') Original.push('TEFQX') Original.push('FSRPX') Original.push('MSSMX') Original.push('FSCSX') Original.push('FSPTX') Original.push('FCPGX') Original.push('MACGX') Original.push('JMCGX') Original.push('FCVSX') Original.push('NEXTX') Original.push('BFOCX') Original.push('BFGFX') Original.push('ADNPX') Original.push('FDSVX') Original.push('FSAVX') Original.push('FHKCX') Original.push('SAGAX') Original.push('FSEAX') Original.push('CPOAX') Original.push('FDCPX') Original.push('FTRNX') Original.push('FNCMX') Original.push('FBGRX') Original.push('FSMEX')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
