long90 发表于 2023-3-28 20:37:57

python简单程序

#! python3
# bullet_point_adder.py 给无序列表添加 每行添加*

import pyperclip


text = pyperclip.paste()

# 分行 添加*
lines = text.split('\n')
for i in range(len(lines)):
    lines = '*' + lines

# lines 拼接成 text
text = '\n'.join(lines)

# 复制到粘贴板
pyperclip.copy(text)

学习编程中的Ben 发表于 2023-3-28 20:39:34

再接再厉!

long90 发表于 2023-3-28 21:19:48

学习编程中的Ben 发表于 2023-3-28 20:39
再接再厉!

谢谢
页: [1]
查看完整版本: python简单程序