- name="Alex"
for i in name:
pass
print("i")
显示的是x
pass 就是跳过
2
name="song" #倒过来,达到"gnos"
if name==name[::-1]:
print("是回文")
else:
print("不是回文")
3
2
name="song" #倒过来,达到"gnos"
if name==name[::-1]:
print("是回文")
else:
print("不是回文")
3
转载于:https://www.cnblogs.com/sjf981012-/p/11155639.html