Update random_key for python 3.3