我试着用我在网上找到的ocde把希伯来文字母组合起来,但结果是: 我无法正确打印希伯来文字母,我认为这是一个编码问题。。 使用python 2.7.15 代码:
# -*- coding: utf-8 -*-
your_list = 'אבגדהוזחטיכלמנסעפצקרשת '
complete_list = []
max_length = 2
a = []
print 'Starting find combinations for', max_length, 'letters, with the chars"'+your_list+'"'
for current in xrange(max_length):
a = [i for i in your_list]
for y in xrange(current):
a = [x+i for i in your_list for x in a];
complete_list = complete_list + a
for x in complete_list:
print x.decode("utf-8")
还有控制台:
Starting find combinations for 2 letters, with the chars"אבגדהוזחטיכלמנסעפצקרשת "
××
ミ×
××
‘×
××
’×
××
“
这只是一部分
使用^{} :
输出:
顺便说一句,Python 2 will retire in ...
相关问题 更多 >
编程相关推荐