面试题总结

1 python

x="今天是个好日子"
print(x[::-1])#[起始位置,终止位置,步长] 起始位置不写默认是从开头;终止位置默认是到结尾;步长默认是1;步长:1 从左到右截取 -1 从右到左截取

结果为"子日好个是天今"

2.
posted @ 2019-07-09 13:52  __张达达  Views(82)  Comments(0Edit  收藏  举报