问题描述:

I want to give a new name to a variable each time I am calling to a function. However, I am receiving an error - SyntaxError: can't assign to function call

def my_function(name):

name = name

'{}_file'.format(name) = open(yaml_file,'r')

my_function('buy')

my_function('sell')

相关阅读:
Top