def assert_element_in_page_source(s): print type(s) print s #assert s in driver.page_sourcecommand='assert_element_in_page_source(u"退出")'print "type(command)",type(command)eval(command) 执行脚本文件.报错如下错误,没找到原因,后续调查 D:\test>python test.p…
1 #! usr/bin/env python3 #-*- coding :utf-8 -*- print('杨辉三角的generator') def triangles(): N=[1] while True : yield N N.append(0) N = [N[i-1]+N[i] for i in range(len(N)) ] triangles = triangles() for j in range(10): print ( next(triangles)) 敲打了如上的代码.在命…