I'm trying to check if an element of a string has a blank space on the left and on the right. I'm trying to use an and operator in Python, but this error occurs:
unsupported operand type(s) for &: 'str' and 'str'
This is my code:
for i in range(0,len(s_sentence)-1):
if (s_sentence[i-1]==' ' & s_sentence[i+1]==' '):
[...]
How can I fix this? thank you!