I was reading this question on storing passwords using a char[] in Java and realized that there are languages that don't have character arrays. Dart and Python both use lists of objects instead of arrays (Dart documentation and Python example tutorial). As far as I understand, this would mean you cannot overwrite the memory and thus would leave the application open to a memory dump attack.
Is there a way to overwrite the memory and thus avoid this attack possibility in Dart or Python?