a=''
b='a'
print(len(a))
print(a.count(''))
print('\n')
print(len(b))
print(b.count(''))
If you squeeze the cord like this,
0
1
1
2
The results come out like this, but I don't understand how to count in count
.
It's a regular expression.
In [1]: import re
In [2]: re.findall('', 'a')
Out[2]: ['', '']
© 2024 OneMinuteCode. All rights reserved.