import re
c = "совесть"
a = re.findall(r"со|ве|ть|не|то|я|а|ь|т|с", c)
replace_list = [("со", "ве", "ть", "не", "то", "я", "а", "ь", "т", "с"), ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")]
r = [replace_list[1][replace_list[0].index(x)] for x in a]
print(r)
# ['1', '2', '10', '3']
<script>
let divs = document.querySelectorAll("a.dropdown-item");
for (let el of divs) {
el.addEventListener("click", (t) => {
console.log(t.target.dataset.price);
});
}
</script>