![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
whiteQ777
这个作者很懒,什么都没留下…
展开
-
Python中字符串处理操作
字符串的连接 两个字符串可以通过’+‘连接 str1 = 'abc' str2 - 'qwe' print str1 +str2 >>>abcqwe 字符串的合并 用 join方法合并 url = ['www', 'baidu', 'com'] print '.'join(url) >>>www.baidu.com 字符串相乘 "*"号跟相乘的次数 l...原创 2018-12-16 17:24:15 · 257 阅读 · 0 评论 -
python 多元字符多项式的展开问题
今天coding中遇到一个问题,背景如下: x = (x1, x2 , x3, x4, x1 * x2 + x3 + x4 + x5) u = (0, 1, 0, 0, 1 ) 求x的u次方,并求出某单项式poly是否包含在该多项式中 ps: x的u次方即为 xi的ui次方的乘积(0 <= i <= 4 ) 解决如下: sympy包 字符串分割 from sympy impo...原创 2019-04-03 11:37:49 · 1561 阅读 · 0 评论