Python中文
首页
教程
问答
标签
搜索
登录
注册
python-如何将unicode文本添加到变量中?
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我见过这样的例子:</p> <pre><code>for name in os.listdir(u'somedir') : </code></pre> <p>我的问题是,我将somedir作为一个变量,所以如何附加'u'文本?</p> <p>有点像</p> <pre><code>for name in ops.listdir(u+somedir) </code></pre> <p>是吗?</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>unicode(somedir)</p> <p>例如,使用内置函数</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何用强化学习更新函数逼近中的权重?
1 回答
如何用归并排序计算倒数?
3 回答
如何用当前数据拟合正弦波?
3 回答
如何用当前页面的值填充表单?
5 回答
如何用彩色地图在2dpython直方图中勾勒出箱子的轮廓?
6 回答
如何用彩色地图给等高线标签上色?
2 回答
如何用彩色打印到控制台?
3 回答
如何用彩色条绘制2d直方图,在Python中显示第三个变量的平均值?
5 回答
如何用彩色条绘制直方图,其中的颜色应与xaxis中的值一致?
9 回答
如何用彩色贴图填充曲线和原始边之间的区域?
5 回答
如何用循环分割数组并对其应用操作?
5 回答
如何用循环创建多个子集的数据帧
2 回答
如何用循环和递归实现求和
2 回答
如何用循环填充数组?
10 回答
如何用循环当前引用的位置更新变量?
1 回答
如何用循环求这个级数的和
8 回答
如何用循环解这个方程?
5 回答
如何用循环语句逐个读取数据帧中的数据?
5 回答
如何用循环除法?(Python)
7 回答
如何用感知一致性对HSV空间进行采样
10 回答