65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"010944,030017,010946,010947,010948,010949,010950,010951,010952,010953,010954,010955,010956,002874,010958,010959,010960,010961,010962,010963,010964\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"import re\n",
|
|
"\n",
|
|
"#输入文件名\n",
|
|
"tex_file = r\"C:\\Users\\weiye\\Documents\\wwy sync\\23届\\上学期周末卷\\周末卷02.tex\"\n",
|
|
"\n",
|
|
"with open(tex_file,\"r\",encoding = \"utf8\") as f:\n",
|
|
" tex_data = f.read()\n",
|
|
"problems_list = re.findall(r\"\\(([\\d]{6})\\)\",tex_data)\n",
|
|
"\n",
|
|
"print(\",\".join(problems_list))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3.9.7 ('base')",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.9.7"
|
|
},
|
|
"orig_nbformat": 4,
|
|
"vscode": {
|
|
"interpreter": {
|
|
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
|
}
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|