plot的使用
例题
- CTF练习:BugkuCTF杂项题:图穷匕见,给出详细的解题过程。


去括号脚本
读取文件
with open(“1.txt”, “r”) as infile:
lines = infile.readlines()
处理每一行,去掉括号和逗号,数字之间用空格分隔
processed_lines = []
for line in lines:
# 去掉括号和逗号,并去除首尾的空白字符
new_line = line.replace(“(“, “”).replace(“)”, “”).replace(“,”, “ “).strip()
processed_lines.append(new_line)
将修改后的内容写入新文件
with open(“output.txt”, “w”) as outfile:
for processed_line in processed_lines:
outfile.write(processed_line + “\n”)
print(“已成功转换,结果保存在 output.txt 文件中”)
扫码得到flag

更新: 2024-10-30 20:31:31
原文: https://www.yuque.com/chaye-apqbl/vsc85q/tgpgp9tv3ub5tc6w