fork download
  1. msg = "hello 123 WORLD"
  2. #将字符串中的"WORLD"替换为"Python"
  3. new_msg = msg.replace("WORLD","Python")
  4. #将整个字符串转换为小写
  5. last_msg = new_msg.lower()
  6. print("字符串转换为小写 :",last_msg)
Success #stdin #stdout 0.07s 14100KB
stdin
Standard input is empty
stdout
字符串转换为小写 : hello 123 python