Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if all characters in a string are the same python

s = "dddd"
if all([x == s[0] for x in s]):
    print("All the characters are same")
 
PREVIOUS NEXT
Tagged: #check #characters #string #python
ADD COMMENT
Topic
Name
3+7 =