Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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))
Comment

PREVIOUS NEXT
Code Example
Python :: small factorial codechef solution 
Python :: pytorch view -1 meaning 
Python :: check python version kali linux 
Python :: python get memory address of variable 
Python :: port 5432 failed: timeout expired 
Python :: unix command in python script 
Python :: python select columns with no na 
Python :: Installing packages from requirements.txt file 
Python :: ParserError: Error tokenizing data. C error: Expected 1 fields in line 6, saw 3 
Python :: python rgb colors 
Python :: python run shell command 
Python :: python program to count even and odd numbers in a list 
Python :: check strings last letter python 
Python :: python currency signs 
Python :: how to print python 
Python :: networkx path between two nodes 
Python :: python reverse geocode 
Python :: print column in 2d numpy array 
Python :: python replace accented characters code 
Python :: how to use virtual environment python 
Python :: python check if string is in input 
Python :: increase colorbar ticksize 
Python :: qradiobutton example 
Python :: python random hash 
Python :: take the first in dataloader pytorch 
Python :: factorial program 
Python :: django template date format yyyy-mm-dd 
Python :: MovieWriter stderr: ffmpeg: error while loading shared libraries: libopenh264.so.5: cannot open shared object file: No such file or directory 
Python :: python sentence splitter 
Python :: connecting python with database 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =