Preheat your oven to 350°F (175°C). Grease the loaf pan or line it with parchment paper.
In a mixing bowl, combine the mashed bananas, pumpkin puree, vegetable oil, sugar, eggs, and vanilla extract. Whisk until the mixture is well combined and smooth.
In a separate bowl, whisk together the all-purpose flour, baking soda, baking powder, ground cinnamon, ground nutmeg, and salt.
Gradually add the dry ingredients to the wet ingredients, mixing with a rubber spatula or wooden spoon until just combined. Be careful not to overmix; it’s okay if some lumps remain.
If desired, fold in the chopped walnuts or pecans.
Pour the batter into the prepared loaf pan, smoothing the top with the spatula.
Bake in the preheated oven for approximately 60 minutes, or until a toothpick inserted into the center comes out clean.
Once baked, remove the bread from the oven and allow it to cool in the pan for about 10 minutes before transferring it to a wire rack to cool completely.