Python

【Python】编程50个经典操作

一、字符串操作1、字符串反转s = "hello" print(s[::-1]) # olleh2、字符串拼接words = ["python", "is", "awesome"] print(" ".join(words)) # python is awesome3、字符串格式化(f