Contact: aviboots(AT)netvision.net.il
39,885 questions
51,811 answers
573 users
import re text = "Hello??? How are you?? What is your Wi-Fi password????"; # Replace multiple consecutive question marks with a single one result = re.sub(r'\?+', '?', text) print(result) ''' run: Hello? How are you? What is your Wi-Fi password? '''