用于比较字符串的模块
compare-strings-lib的Python项目详细描述
比较字符串
- 用于比较两个字符串的python库
- 在str1=str2的情况下,返回值将是
1
- 对于str1>;str2返回的值将是
0
- 对于str1<;str2返回的值将是
-1
安装:
pip3 install compare_strings_lib
用法:
from strings.compare import compare
result = compare("1.2", "1.1")
- 项目
标签: