Def make_great (magicians) :
For the name in magicians:
The magician='the Great' + name
Name=magician
Print (name)
Def show_magician (names) :
For magician in names:
Print (magician)
Magicians=[' John ', 'machel', 'jack']
Make_great (magicians)
Show_magician (magicians)
Why there is no change the original list?
CodePudding user response:
This code is not on the list for deletion, simply list the contents of the traversal string concatenation and printed
Is the feeling which block of code will change list?
CodePudding user response:
For the name in magicians:
The magician='the Great' + name
Name=magician
This won't be in the traverse the list of list elements to change?
CodePudding user response: