【Python】编程50个经典操作 一、字符串操作1、字符串反转s = "hello" print(s[::-1]) # olleh2、字符串拼接words = ["python", "is", "awesome"] print(" ".join(words)) # python is awesome3、字符串格式化(f Python 2025年04月19日 197 点赞 0 评论 22737 浏览