I want to write a recursive function that prints out the ways to reach a point where N and K are positive so for example if the point is (1,1) r= right u = up
So the function will print ur ,ru. If the point is (2,2) then the possible steps are: rruu, ruru, urru, uurr I have bulited a function that print all the combination that posibale of the r and u posibale(when it contains also rrrr or uuuu). but i need only the sequences that num of 'r' = num of 'u'. The func i have written suposse to help the function i wanted
def assist_print_sequences(char_list, last_seq, n):
# base case
if n > 0:
for char in char_list:
# looping over all the chars in list and adds them to last chars until n<1.
assist_print_sequences(char_list, last_seq + char, n-1)
# when n is smaller than 1.
else:
print(last_seq)