<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list(self, cart_glob=['*.json']):
 """ List all carts """

        carts = []
        for glob in cart_glob:
            # Translate cart names into cart file names
            if not glob.endswith('.json'):
                search_glob = glob + ".json"
            else:
                search_glob = glob

            for cart in juicer.utils.find_pattern(Constants.CART_LOCATION, search_glob):
                cart_name = cart.split('/')[-1].replace('.json', '')
                carts.append(cart_name)

        return carts