Rodrigo Girão Serrão 🐍🚀@mathspp.com2 MarHow do you collapse runs of adjacent spaces in Python? That is, shorter runs of 2+ consecutive spaces so there's only 1 space there? I can't come up with a simple/straightforward way to do it with `str.join` and I'm surprised... What am I missing?41
Rodrigo Girão Serrão 🐍🚀@mathspp.comNope because if you have newlines, for example, those will disappear!2/3/26, 2:38 pm·0 reposts·0 likes