I'm trying to access a model, with a name that is dependant on a variable value.

If have a series of models based on a country identifier. e.g. Student\_??? where ??? is the country identifier.

If I want to print out details of each student for each country, is there a way of looping through the code to access each model dynamically. I could perform the task through an if statement, but that would require hardcoding each country code into the program, which I want to avoid.

As an example. My views.py looks like:

```
mystudentcountry = {'AU', 'US', 'UK', 'EU'}

for country in mystudentcountry:

    mystudent = Student_AU.objects.all()

    for student in mystudent:
        print(f'{student.name} is {student.age} years old and studies in {country}')

```

On the third line of code "mystudent = Student\_AU.objects.all()" is it possible to replace the "AU" with each country as identified in the loop.

Thank You for your support.