Question: PYTHON 3 ** USE RECURSION ** Use no for loops or comprehensions (which include for loops) in your code. Do not call the min or
PYTHON 3 **USE RECURSION **Use no for loops or comprehensions (which include for loops) in your code. Do not call the min or max or sorted functions or the sort method on lists. If you use local variables, each can be assigned a value only once in a call, and it cannot be re-assigned or mutated; try to use no local variables (except where they are mentioned in hints). Of course, do not mutate any parameters. 1. Define a recursive function named merge_chars; it is passed two str arguments, in which all the characters appear in alphabetic order; it returns a str that contains all the characters in its argument strings, also appearing in alphabetic order. For example, merge_chars('abxy','lmz') returns 'ablmxyz'. Of course you cannot just concatenate the strings and sort the result (that would make the solution trivial and not recursive); you can compare strings to the empty string and compare the first character in one string to the first character in the other, and can slice strings and concatenate them.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
