Question: Write a function pull ) that takes two arguments, in the following order: 1. strings: a list of strings (e.g, ['abcde',fghj', 'jk]) 2. i: an

 Write a function pull ) that takes two arguments, in thefollowing order: 1. strings: a list of strings (e.g, ['abcde',fghj', 'jk]) 2.

Write a function pull ) that takes two arguments, in the following order: 1. strings: a list of strings (e.g, ['abcde',fghj', 'jk]) 2. i: an integer that indicates which character of each string the function will extract (pull out) The function extracts the character at index i of each string, appends the characters to an empty list, and then returns the resulting list. For example, if i-2, then the function extracts the character at index i of each string, if such a character exists, and appends them to a list. For the list of strings above the returned result would be ['c', 'h' ] Hints: . Recall that the valid indexes of a list are 0 through len (list.name) -1. Use this fact to see if a list is long enough to have a character with index i To create an empty list, type list.name[, where list_name is the name of the list. Use the append method to append an item to the end of a list. For example, to append letter to the list called result, type result.append (letter) PYTHON Examples: Function Call pull (['Z9', 'gbd2xKC', '7MWt0', dcl2'], 1) pull ([' GMca',xuP5S', 1) Return Value OvnLHgz'1, 6) ySTuI1', FHLoDVwO, WUybIBOA', 1) pull (['vFmq,5wVxmCT', 6) pull (['EXdfk, 'T2RCPQn5', 0) pull ([ Q7A, 4Dhm8G1j',BQ1FH', 0) pull ('YFnofD, o2eMrAY, EofzJ, OxEot 13z, 'jmksbi'], 5) pull ( yCZMkI', '21'], 2) pull ('iL', 'C8n7','vj5gq', 'nl',NJ20EYMx ['Z' 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!