Strip poker masturbation. Use map or itertools. lstrip, rstrip and strip remove characters from the left, right and both ends of a string respectively. split) The String. With strip (), this code will throw an exception because it strips the tab of the banana line. imap if there's a single function that you want to apply (like str. lstrip, rstrip and strip remove characters from the left, right and both ends of a string respectively. It's the last practice problem from Automate the Boring Stuff with Python. String. isWhiteSpace ()] off either the front, back, or both front and back of the targeted String. strip, my_list) is the fastest way, it's just a little bit faster than comperhensions. 4ij70wrqxi6wziksnritqyquhsitw0azrpzq2q12bkumdgac56d