A_byte_of_Python-v192-for_Python_3.0-中文版.pdf 中的一道题:
练习题:
检测一个文本是否为回文应该忽略标点,空格和大小写。
例如”Rise to vote,
sir.”同样是一个回文,但是我们当前的例子无法识别它。你能
改善这个例子让它做都这点吗?
代码有点挫,莫笑:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
回文验证,码迷,mamicode.com
时间: 2024-08-12 04:35:29