I want to replace the elements from list letters with the list elements from list animals where as print(letters) would print
["cat","dog","mouse","rabbit","hamster","duck","chicken","goose","hedgehog"]
How do I pass the value of the variable animals from the function newlist to the function main and then replace the value of variable in main
Code
def newlist():
animals = ["cat","dog","mouse","rabbit","hamster","duck","chicken","goose","hedgehog"]
def main():
letters = ["A","B","C","D","E","F","G","H","I"]
print(letters)
main()