Solve Problems by Coding Solutions - A Complete solution for python programming
def check(string) :
p = set(string)
s = {'0', '1'}
if s == p or p == {'0'} or p == {'1'}:
print("Yes")
else :
print("No")
if __name__ == "__main__" :
string = "101010000111"
check(string)
Post a Comment
No comments:
Post a Comment