我建立了一个包含阿拉伯语单词的数据库,当我获取数据并打印出来时,它可以正常工作并打印:
مشاعر
مودة
但当我循环到那个数据库,把它变成一个列表,然后打印这个列表,看看发生了什么,我得到:
['\u202b\u202bمشاعر\u202c', '\u202b\u202bالمودة\u202c']
代码如下:
cors.execute("SELECT * FROM DictContents") # Selecting from database
self.AraList = [] # empty list to put arabic words in
for raw in cors.fetchall(): # fetching data from database
rawAra = raw[1] # the database includes more than that so this index refer to arabic table
print(rawAra) # here is the first print . works fine as i said .
self.AraList.append(rawAra)
print(self.AraList) # here is the other list printing
在我要求之前,我试过不止一种方法来修复它,但没有一种方法对我有效。你知道吗
找到。。。你知道吗
相关问题 更多 >
编程相关推荐