Does not import standard library modules of python?

I wanted to use the pickle module. Prior to that, he worked now when I try to run the following code
l = [1,2,3,4]
x = 48

import pickle

f = open('', 'wb')
lis = pickle.dump(l, f)
num = pickle.dump(x, f)

of = open('', 'rb')
load = pickle.load(z)

Climbs error
# ImportError: cannot import name 'FunctionType' from 'types'

By the way same thing with the random module, only changes to FunctionType MethodType
# ImportError: cannot import name 'MethodType' from 'types'

I tried to understand the translation but I don't understand. Help
March 23rd 20 at 19:28
1 answer
March 23rd 20 at 19:30
You load a pickle file ofand of an unknown variable z. Either the question is incorrect, or it is incomplete.

Find more questions by tags Python