ZorinOS comes with Python 3.22.30 but says version 2.24

I am trying to use a Gtk listbox which was introduced in Gtk 3.10. When I run a test Python app, it complains that Gtk repository has no such reference. It also states that my Gtk version is 2.24. If I execute ‘dpkg -l libgtk-[0-9]* | grep ^i’ it shows a series of Gtk version including 3.22.30, but not 3.10. So I should be good, but I’m not.

If I put gi.repository.Gtk.ListBox() in my code, upon exceution I get ‘gi.repository.Gtk’ object has no attribute ‘Listbox’.

I have tried everything I can think of to make this work. If I execute env | grep -i gtk, I get:
QT_QPA_PLATFORMTHEME=gtk3
GTK_MODULES=gail:atk-bridge
GTK_IM_MODULE=ibus

I am new to ZorinOS 15.3 and to Python and my Unix experience is way out of date.

What am I overlooking?

Thanks in advance.

More info:
If, at the Python prompt, I type:
Gtk.MAJOR_VERSION, Gtk.MINOR_VERSION, Gtk.MICRO_VERSION
(3, 22, 30)
I tried changing the example Python code from:
gi.require_version(“Gtk”, “3.0”)
from gi.repository import Gtk
to
gi.require_version(“Gtk”, “3.22”)
from gi.repository import Gtk
And I get: ValueError: Namespace Gtk not available for version 3.22
I also tried 3.22.30, but I get:
ValueError: Namespace Gtk not available for version 3.22

I also tried “3.22.30”

These are

Did you type python or python3?
Normally python points to python 2 and python3 to python 3.

I think you can type

python -version

To get the version you are using.

Thank-you. That helped.