Answers for "how to check if string is camelcase python"

0

how to check if string is camelcase python

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))
Posted by: Guest on August-09-2020

Code answers related to "how to check if string is camelcase python"

Python Answers by Framework

Browse Popular Code Answers by Language