I have a list as below and I want to separate out the list based on the string thats ens with

```
list = ['a_balance', 'b_balance', 'a_agg_balance', 'b_agg_balance']

```

expected output

```
list_bal = ['a_balance', 'b_balance']
list_agg_balance = ['a_agg_balance', 'b_agg_balance']

```

I tried below code but `[col for col in list if col.endswith('_balance')]` also includes the elements that endswith '\_agg\_balance'

```
list_bal = [col for col in list if col.endswith('_balance')]
['a_balance', 'b_balance', 'a_agg_balance', 'b_agg_balance']

list_agg_balance  = [col for col in list if col.endswith('_agg_balance')]
['a_agg_balance', 'b_agg_balance']

```