import re
text = ['bits', 'scrap 1.2', 'bits and pieces', 'junk 3.4.2']
print([re.sub(r'\s+\d+(?:\.\d+)*$', '', x) for x in text])
# => output = ['bits', 'scrap', 'bits and pieces', 'junk']
aW1wb3J0IHJlCnRleHQgPSBbJ2JpdHMnLCAnc2NyYXAgMS4yJywgJ2JpdHMgYW5kIHBpZWNlcycsICdqdW5rIDMuNC4yJ10KcHJpbnQoW3JlLnN1YihyJ1xzK1xkKyg/OlwuXGQrKSokJywgJycsIHgpIGZvciB4IGluIHRleHRdKQojID0+IG91dHB1dCA9IFsnYml0cycsICdzY3JhcCcsICdiaXRzIGFuZCBwaWVjZXMnLCAnanVuaydd