已知:s="hello",t="world",编程显示 s+=t 运算后的s、s[-1]、s[2:8]、s[::3]、s[-2::-1]的值,并将各值写在注释语句中。
时间: 2023-04-03 16:02:11 浏览: 564
s = "hello"
t = "world"
s = t # s = "world"
s[-1] # "d"
s[2:8] # "rld"
s[::3] # "wl"
s[-2::-1] # "lrow"
阅读全文