To get a list of format names and common extensions use:
from osgeo import gdal
for i in range(gdal.GetDriverCount()):
drv = gdal.GetDriver(i)
if drv.GetMetadataItem(gdal.DCAP_RASTER):
print(drv.GetMetadataItem(gdal.DMD_LONGNAME), drv.GetMetadataItem(gdal.DMD_EXTENSIONS))
Output snippet:
('Virtual Raster', 'vrt')
('GeoTIFF', 'tif tiff')
('National Imagery Transmission Format', 'ntf')
('Raster Product Format TOC format', 'toc')
('ECRG TOC format', 'xml')
('Erdas Imagine Images (.img)', 'img')
('CEOS SAR Image', None)
('CEOS Image', None)
('JAXA PALSAR Product Reader (Level 1.1/1.5)', None)
('Ground-based SAR Applications Testbed File Format (.gff)', 'gff')
('ELAS', None)
('Arc/Info Binary Grid', None)
That is assuming you only want raster formats, and are using GDAL 2.0+. If you are using 1.x you can omit the DCAP_RASTER test. This is commonly used in 'Open...' or 'Save As...' dialogs for recommended names. If you are doing a 'Save As...', you have to check for the appropriate metadata option for Create() or CreateCopy()(DCAP_CREATE/DCAP_CREATECOPY).
Apologies if my code is non-pythonic, I rarely use it. If you'd like a specific answer for a specific version, please post your gdal version.