Question: I have a list which is constantly updated

for example:

```
list_a = [ 'BTC', 'BUSD', 'ETH', 'BTC'] 

```

my string variable is:

```py
string = list_a[0]+list_a[1] # when printed this gives BTCBUSD
needed_string=("'{}'".format(string)) #when printed this gives 'BTCBUSD', which seems correct to me
#also tried to add : str(needed_string), gives same string when printed as above

```

If I pass `needed_string` as a parameter in a function it does not work.

If I type `needed_string = 'BTCBUSD'`  it does work

How can I fix this?

Edit:

The list contains crypto coins

The string is combined pair, example 'BTCBUSD'

The string is needed as parameter for a ticker

```py
ticker = client.get_ticker(symbol=needed_string)

```

This is my error:

```
Illegal characters found in parameter 'symbol'; legal range is '^[A-Z0-9-_.]{1,20}$'

```

Answer: 
You just need to 'add' the strings together:

```py
list_a = [ 'BTC', 'BUSD', 'ETH', 'BTC'] 
ticker = client.get_ticker(symbol=list_a[0]+list_a[1])

```
Your code produces :

```
"'ab'" # note single+double quotes

```

Try this :

```
needed_string=('{}'.format(string))

```

It should give :

```
'ab'

```