Using apt:
apt list --installed
The list can be filtered using grep. For example:
apt list --installed | grep python3.5
Using dpkg:
dpkg --get-selections | grep -v deinstall
The list can be filtered using grep. For example:
dpkg --get-selections | grep -v deinstall | grep python3.5