I am trying to delete "{" and "}" from array which looks like:
data = [{'Python'}, {'5'}, {'Golang'}, {'4'}, {'PHP'}, {'3'}]
Solutions like converting array/list to string and after that replacing symbols do not work as expected.
Could you help with it, please?
Im waiting output like:
[‘Python’, ‘5’, ‘Golang’, ‘4’, ‘PHP’, ‘3’]
>Solution :
This array looks to be a list of sets with a single element.
You can create a new list of strings:
data = [''.join(my_set) for my_set in data]
The output is:
['Python', '5', 'Golang', '4', 'PHP', '3']