1784. Check if Binary String Has at Most One Segment of Ones Updated: 2024-03-12 1 min read Algorithms , LeetCode On This PageLeetCode problem 1784class Solution: def checkOnesSegment(self, s: str) -> bool: return '01' not in s