Answer the question
In order to leave comments, you need to log in
How to move the + symbol in a string through a regular expression: hello+t -> hello+et?
to + stand before the stressed vowel
Answer the question
In order to leave comments, you need to log in
Why is there a regular?
text = 'приве+т'
symbol = '+' # символ
shift_pos = -1 # на сколько подвинуть
pos = text.find(symbol)
out = text[:pos] + text[pos+1:]
out = f'{out[:pos+shift_pos]}{symbol}{out[pos+shift_pos:]}'
print(out)
# прив+ет
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question