递归蝌蚪找妈妈

import time
animals_list = ['鲤鱼','乌龟','青蛙']
def find_mother(animals_list):
    time.sleep(1)
    animal = animals_list.pop(0)
    print('你好%s,你是我的妈妈么'%animal)
    time.sleep(1)
    if animal == '青蛙':
        return '好孩子,你们已经长成青蛙了,快跳上来吧!'
    print('%s:抱歉,我不是,你们的妈妈头顶上有两只大眼睛,披着绿衣裳。你们到那边去找吧!' % animal)
    res = find_mother(animals_list)
    return res
res = find_mother(animals_list)
print(res)
原文地址:https://www.cnblogs.com/raitorei/p/11801327.html