Answer the question
In order to leave comments, you need to log in
How to replace elements of a Python list?
Script
data = {(1, 'USD_RUB'), (2, 'EUR_RUB')}
def exmo_func():
for pair in data:
pair[1].replace('RUB', 'RUR')
print(data)
Answer the question
In order to leave comments, you need to log in
data = {(i[0], i[1].replace('RUB', 'RUR')) for i in data}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question