Parcel lockers use a 6-digit pickup code, and people often type extra spaces in the middle or at the ends. Write valid_pickup(code): remove every space, then return True if exactly 6 digits are left, otherwise False. An empty string is False too.
valid_pickup("123456")→Truevalid_pickup("123 456")→Truedef valid_pickup(code):
digits = code
# your code here: remove every space from digits
# your code here: return True if it's 6 long and all digits
return False
Run tries the examples. When they look right, Submit.