Using a bytearray datatype to store a password (in memory) has an advantage over using a string datatype for a password in that a bytearray is mutable and can be overwritten with 0x00 values when the password is no longer needed for processing and until the password variable is garbage collected.  It's not clear to me, however, whether overwriting 0x00 values will achieve what is intended.  When a password is no longer needed, it should be wiped from memory, prior to GC.  Is this possible in python 3.4 using bytearray?
Using a bytearray rather than a string to store password in memory
python