Python max()方法
Python max()方法
Python max() 方法返回字符串中最大的字母。
语法
max()方法语法:
max(str)
参数
- str -- 字符串。
返回值
返回字符串中最大的字母。
实例
以下实例展示了max()函数的使用方法:
#!/usr/bin/python str = "this is really a string example....wow/b64/"; print "Max character: " + max(str); str = "this is a string example....wow/b64/"; print "Max character: " + max(str);
以上实例输出结果如下:
Max character: y Max character: x
相关文章
- Python 变量类型
- Python continue 语句
- Python Number 数字
- Python 元组
- Python2 与 Python3 版本区别
- Python 算法设计
- Python3 面向对象
- Python File fileno() 方法
- Python File seek() 方法
- Python os.chown() 方法
- Python os.close() 方法
- Python os.ftruncate() 方法
- Python os.stat_float_times() 方法
- Python isspace()方法
- Python istitle()方法
- Python 字典 Dictionary get()方法
- Python 字典 Dictionary values()方法
- Python time localtime()方法
- Python time mktime()方法
- Python time strftime() 方法