Post History
Python 3, 142 bytes def f(s): m=1;r="" for c in s.upper(): if'@'<c<'['or'-'==c:r+=c*m;m=0 if c in":; ":r+=c*(c!=' ');m=1 if c in".?!":r+=' ';m=1 return r Try it online!
Answer
#1: Initial revision
# [Python 3], 142 bytes <!-- language-all: lang-python --> <pre><code>def f(s): 	m=1;r="" 	for c in s.upper(): 		if'@'<c<'['or'-'==c:r+=c*m;m=0 		if c in":; ":r+=c*(c!=' ');m=1 		if c in".?!":r+=' ';m=1 	return r </code></pre> [Try it online!][TIO-ktgrn1mh] [Python 3]: https://docs.python.org/3/ [TIO-ktgrn1mh]: https://tio.run/##bZGxboMwEIbn8BSHF0NLUKNOCXGp1KHNXilD1MGxTUEFHzobRTw9xYlUtaLe7O87yf/9/ehrtI/TpE0FVeLSXbTqxKYgwVi0qpBAQWPB5UPfG0oCXjUVf@Z7tecnjsTXXAi1o3uh7rqiEw9X4TrFdgWwG0lULDjwdBY2v4S8jK/CjG6EjB/IAk3eOK@kMw4EnIC9mbbFDI5IrY5ZFsGfw16khREH6OSXgc6ABCetvjSqLpdyPc5J1tYMnhqLS/6OCC3azwJ0oy33QEbqpXYA5wfdGJ2BxqBdkGjM4QCXpm2hl87ly6ljLX1ZlnH5T4pX48Pnt1s4o/ftnB0rOBtDGZwJYwYfURQaCbsJpfzsaC6ln7P4JLxkwNZPLJvLDLc0nb4B "Python 3 – Try It Online"