写入文件。如果我运行下面的代码: text = 'سلام عزیزم! عزیزم سلام!'
with open('temp.txt', 'w') as out_file:
print(text)
out_file.write(text)
with open('temp.txt', 'r') as in_file:
print(in_file.read())
我正在尝试使段落中的对象与显示其频率的单词相对应。 var pattern = /\w+/g,
//the farsi paragraph
string = "من امروز در مورد مهر خروج مشمولین اطلاعات جدیدی از سفارت ایران در مالزی گرفتم",
matchedWords = string.match(p