2914. Minimum Number of Changes to Make Binary String Beautiful
## 思路
扫整个字串 并纪录1,0的奇偶
如果目前字符是1/0 然后有奇数个0/1 就reset并且result+1
不然就更新1,0的奇偶
## Code
```python
class Solution:
def minChanges(self, s: str) -> int:
one = zero = 0
res = 0
for ch in s:
if (ch == '1' and zero) or (ch == '0' and one):
one = zero = 0
res += 1
elif ch == '1':
one ^= 1
else:
zero ^= 1
return res
```