![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
德莫@
这个作者很懒,什么都没留下…
展开
-
python学习笔记:字符串问题和基本数学函数
#字符串中有引号,用三引号print(’’‘I’m ady,Tomy said:“practice makes perfect”’’’)r不想让转义字符生效值生成原来的字符print(r"\n")#**次方常见数学函数(在math包里)用法示例:math.ceil()print(“4**4”)round四舍五入abs绝对值取整ceil 向上取整floor*向下取整trunc 截取整数位pow 幂运算math.pow(2,4)=16字符串基本知识字符串连接:‘A’+‘B’=‘AB原创 2021-08-05 15:13:03 · 135 阅读 · 1 评论 -
虚拟机下创建c程序并执行
linux命令行将test.s文件改为文件名为xxx.o的可执行文件g++ -c test.s -o xxx.o执行可执行文件在这里插入代码片原创 2021-03-14 18:01:36 · 3802 阅读 · 0 评论 -
No module named ‘lxml
python运行下面的代码发现报错import requestsfrom lxml import htmlurl = 'https://movie.douban.com/' # 需要爬数据的网址page = requests.Session().get(url)tree = html.fromstring(page.text)result = tree.xpath('//td[@class="title"]//a/text()') # 获取需要的数据print(result)出现报错原创 2021-01-07 16:13:59 · 906 阅读 · 0 评论