Python判断给定的数是否是回文数,,def isPalind
Python判断给定的数是否是回文数,,def isPalind
def isPalindromic(str): strlist = list(str) strlist.reverse() newstr = ''.join(strlist) if cmp(strlist,newstr): print "Yes,it is palindromic" else: print "No, it is not palindromic"isPalindromic('12321')
输出
Yes,it is palindromic
相关内容
- python检测远程udp端口是否打开,python检测udp端口,impor
- Powell’s method of minimizing user-supplied function in Python,,'
- Python多线程应用详解,python多线程详解,一、Python中的线
- 一个简单的python定时器实现,python定时器,下面介绍以
- Gauss-Legendre integration in Python,,''' I = gaus
- python获取从命令行输入的数字代码演示,python命令行
- python实现类的静态变量的代码示例,python静态,class Ca
- python socket timeout设置,pythontimeout,需要在调用socket的
- python获取一组数据里的最大值max函数使用演示,python
- python使用 htmllib 分析网页内容,pythonhtmllib,import htmll
评论关闭