📌  相关文章
📜  如何检查字符串是否为驼峰python代码示例

📅  最后修改于: 2022-03-11 14:45:45.516000             🧑  作者: Mango

代码示例1
def is_camel_case(s):
    return s != s.lower() and s != s.upper() and "_" not in s


tests = [
    "camel",https://stackoverflow.com/questions/10182664/check-for-camel-cas...
    "camelCase",
    "CamelCase",
    "CAMELCASE",
    "camelcase",
    "Camelcase",
    "Case",
    "camel_case",
]

for test in tests:
    print(test, is_camel_case(test))