Q:

How can i convert string to Kivy id's value?

I know that Kivy ids is not a string, but what kinde of data type is it, and how can i convert a string to that data type? I have tried this:
def test(self, example):
    new_name = self.ids.example
    new_name.text = "Hi"
test("button_1")

And i have tried this:
def test(self, example):
    for key, val in self.ids.items():
        if key == example:
            new_name = self.ids.key
            new_name.text = "Hi"

test("button_1")

In my .kv file the id of the button is: button_1

A:

You can access an id with a string by using the ids['key'] approach. Something like:
def test(self, example):
    new_name = self.ids[example]
    new_name.text = "Hi"

