Preheat your oven to 350°F (175°C). Grease a 9x5 inch loaf pan.
In a large bowl, whisk together the flour, baking soda, baking powder, and salt.
In another bowl, mix the oil, granulated sugar, brown sugar, eggs, and vanilla extract until well combined.
Stir in the mashed bananas and grated zucchini.
Gradually add the dry ingredients to the wet ingredients, mixing just until combined. Fold in the walnuts if using.
Pour the batter into the prepared loaf pan and smooth the top.
Bake for 60 minutes, or until a toothpick inserted into the center comes out clean.
Allow the bread to cool in the pan for 10 minutes, then transfer to a wire rack to cool completely.