我想获取Python中函数的文件路径。
怎么做?
例如,
import keras.backend as K
y = K.resize_images(x, 2, 2, 'channels_last')
path = function(K.resize_images)
print(path)
#C:\Program Files\Python36\Lib\site-packages\keras\backend\tensorflow_backend.py
Run Code Online (Sandbox Code Playgroud)
谢谢。
如何更改string为result?
string = 'John and Mary are good friends'
d = {'John': 'Sam', 'Mary': 'Ann', 'are': 'are not'}
result = 'Sam and Ann are not good friends'
Run Code Online (Sandbox Code Playgroud)
谢谢。
python ×2