str = 'yob a ma i' # 10 def recursion(mystr): global rstr index = 0 strlen = len(mystr) if 1 != strlen: recursion(mystr[index+1:strlen]) print mystr[index] rstr += mystr[index] rstr= '' recursion(str) print rstr
str = 'yob a ma i' # 10 def recursion(mystr): global rstr index = 0 strlen = len(mystr) if 1 != strlen: recursion(mystr[index+1:strlen]) print mystr[index] rstr += mystr[index] rstr= '' recursion(str) print rstr