一、 value = True if request.Post["value"] == 'U' else False 二、 assertTrue (all( a == b for a, b in zip(response.contex_data['questions'],Question.objects.all()))) 三、查看文件夹下面的所有文件 import os from os.path import isfile,join files = [f for f in os.listdir() if isfile(join(f))] ……
Python
人生苦短,我用Python。