trunk_port = [ 'a' ]
access_port = [ 'b' ]
param = 'access'
trunk_port = [ 'a' ]
access_port = [ 'b' ]
param = 'access'
print(*[value for var, value in locals().items() if param in var])
interface = input('....')
if interface == 'access':
# печатаем содержимое access_template в цикле