Question: # b) Write python code below that does the following: # Now that my_list has fewer items, compute the number of words from my_list #

\# b) Write python code below that does the following: \# Now that my_list has fewer items, compute the number of words from my_list \# where the first or last letter matches at least one of the letters of \# MY_WORD. The count should be set in a variable named my_count. It is \# initialized to 0 below. mycount =0 \# please do not modify these last few lines. They will be used to evaluate your \# exam. If you have used any print statements in your own code, please comment \# them out. orig_list =1 ['orchids', 'chamber' " "phoenfix" " central' " juggler', 'dungeon', 'passive', 'capable', 'creatox" " rabbits" " "succeed" "compute', 'achieve', 'attempt', 'network', 'address' " 'supreme' "believe', 'concern', 'explore', 'finance', 'benifit', '1icense' , 'carcass' " abalone', 'morning', 'abandon', 'macabre', 'teacher', 'bil1ion' " yankees" , "mistake" "suspect', 'barrack', 'connect', 'operate', 'cabbage', "ability" " "rushing" " passion', 'perfect', 'fashion', 'outputs', 'success", "banking" " journal' ] print(f'Q2smy_list:\{1en(my_1ist)\}:tset(orig_1ist)-set(my_1ist)\}') print(f'Q2:'my_count: \{my_count } ')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
