Question: Python programming language required Write a function alternate(s, t, n) that takes two strings s and t plus a non-negative integer n. The function should
Python programming language required

Write a function alternate(s, t, n) that takes two strings s and t plus a non-negative integer n. The function should print out all strings of length n that can be formed by choosing any character from s, then any character from t, then any character from s, and so on, alternating between s and t. Any character from s or t can appear more than once in an output string. You may print the output strings in any order. For example, alternate('st', 'ao', 3) might print sas sat sos sot tas tat tos tot alternate('bcd', 'aei', 4) might print baba babe babi baca bace baci bada bade badi beba bebe (many more output lines) ###
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
