I have a list of strings and I would like to get rid of the part of the string after the character '_', but it gives me an error I can't find
import requests
url = 'https://data.gateapi.io/api2/1/pairs'
r = requests.get(url = url)
coins = r.json()
print(coins)
['USDT_CNYX', 'BTC_USDT', 'BCH_USDT', 'ETH_USDT', 'ETC_USDT', 'QTUM_USDT', 'LTC_USDT', 'DASH_USDT', 'ZEC_USDT', 'BTM_USDT', 'EOS_USDT', 'REQ_USDT', 'SNT_USDT', 'OMG_USDT']
clean_coins = []
for coin in coins:
test=coin.split("_")
test = test[0]
clean_coins = clean_coins.append(test)
AttributeError: 'NoneType' object has no attribute 'append'