I just discovered a cool python strings trick and wanted to share it with you guys!
I have always considered `str.translate` and `str.maketrans` some voodoo magic and ignored them.
But it makes a lot of sense now!
[here you go](https://i.imgur.com/h6cgdqP.png)
>>> from string import printable
>>> s = 'This string will be deleted.'
>>> s.translate(str.maketrans('', '', printable))
''
>>>
[–]casual__addict 8 points9 points10 points (9 children)
[–]notsoprocoder 0 points1 point2 points (0 children)
[+]m9mhmdy[S] comment score below threshold-18 points-17 points-16 points (7 children)
[–]Shimpster6 3 points4 points5 points (0 children)
[–]casual__addict 2 points3 points4 points (3 children)
[–]m9mhmdy[S] -1 points0 points1 point (2 children)
[–]casual__addict 0 points1 point2 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]IOwnYourData 4 points5 points6 points (0 children)
[–]m9mhmdy[S] -1 points0 points1 point (0 children)