Question: Implement q3(inputString, minLetter, lettersIgnore) so that it returns two things: the smallest letter in inputString that is both greater than minLetter and not in lettersToIgnore
Implement q3(inputString, minLetter, lettersIgnore) so that it returns two things: the smallest letter in inputString that is both greater than minLetter and not in lettersToIgnore the highest index at which that letter occurs. If there is no such letter return None for both values. i.e. (None None) inputString is a string a zero or more lower case letters, minLetter is a lower case letter, and lettersToIgnore is a string of zero or more lower case letters. Use a simple while loop. You may not use any string methods, but you may use the 'in' or 'not in' operators.
In Python!!
E.g.
>>> q3("bccacbd", "a", "eb")
('c', 4)
>>> q3("bccacbd", "a", "aefg")
('b', 5)
>>> q3("abc", "d", "")
(None, None)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
