python程序:检查字符串是否是回文(1)
来源:互联网 发布:在线端口检测 编辑:程序博客网 时间:2024/06/06 09:18
python程序:检查字符串是否是回文
#!/usr/bin/python
#Filename: user_input.py
#Function: check whether the string is palindrome or not.
def reverse(text):
return text[::-1]
def is_palindrome(text):
return text == reverse(text)
something = input('Enter text:')
if (is_palindrome(something)):
print('Yes, it is a palindrome.')
else:
print('No, it is not a palindrome.')
阅读全文
0 0
- python程序:检查字符串是否是回文(1)
- python程序:检查字符串是否是回文(2)
- 检查字符串是否为回文字符串
- python判断输入的字符串是否是回文联
- 检查链表是否是回文
- 判断字符串是否是回文
- Java字符串是否是回文
- 判断字符串是否是回文
- 判断字符串是否是回文
- 检查字符串是否是整数
- 队列-----判断一个字符串是否是回文
- 判断一个字符串是否是“回文”数字
- 判断一个字符串是否是回文。
- 算法:判断字符串是否是回文的
- 简单判断字符串是否是回文
- 判断字符串是否是回文.时间复杂度
- 【C语言】判断字符串是否是回文
- 判断字符串是否是一条回文
- linux 正则表达式和通配符
- pom.xml加载本地Jar包
- Windows和Linux查看和更改mysql连接池
- java int类型与char类型转换
- uboot下载配置事项,使用uboot下载裸机程序,并运行
- python程序:检查字符串是否是回文(1)
- Android 获取SHA1命令
- python3
- Android开发,GPS获取实时时间并转为北京时间,定位信息,海拔高度,并进行显示
- 05、vue.js 之过滤器与实时计算
- 利用KMP算法,求顺序表存储的两个字符串的最长公共子串
- Html.DevExpress().TokenBox 属性说明,智能下拉
- 根据rgb获取颜色16进制代码
- BZOJ4884: [Lydsy2017年5月月赛]太空猫