随笔分类 - python学习记录
python用以自动化测试
摘要:''' 整数转换成二进制 ''' def bin_ary(number): if not number.isdigit(): print('enter your number') else: number = int(number) s = '' while(number // 2 >= 1): ...
阅读全文
摘要:使用for遍历list时,容易出现漏删,例如: app_id_list = [1,2,3,4,5,6] for app_id in app_id_list: print "app_id", app_id app_id_list.remove(app_id) print "at last:", app
阅读全文