Where does majority of the energy for the magical effect of a potion comes from? 

Does it all comes from the brewer? Or does most of it comes from the ingredients? 

I know JKR said that you have to use magic at some part of the process of brewing (hence no muggle potion brewers) [what about a squib?]

If brewer provides all of the energy then why aren't NEWT students magically exhausted after every potion class? Hermione successfully brewed batch of Polyjuice Potion (a very potent NEWT level potion) in first semester of her second year, and while brewing it was very time-consuming and required a lot of concentration she never showed any signs of exhaustion as far as I remember.


Question: Replacing one character of a string in python
Answer: In new enough pythons you can also use the builtin bytearray type, which is mutable. See the stdlib documentation. But "new enough" here means 2.6 or up, so that's not necessarily an option.

In older pythons you have to create a fresh str as mentioned above, since those are immutable. That's usually the most readable approach, but sometimes using a different kind of mutable sequence (like a list of characters, or possibly an array.array) makes sense. array.array is a bit clunky though, and usually avoided.