I have the following function, I want to concat the 2 strings, What wrong am I doing here?
commands = ["abcd","123"]
def configure_dev(self, steps):
func_name = self.id + ':configure dev'
global conf_cmd
for key in commands:
conf_cmd += key + '\n'
print(conf_cmd)
Getting the following error:
conf_cmd += key + '\n'
After running it, I get this error:
NameError: name 'conf_cmd' is not defined
conf_cmd?globaldoes not create a new variable.