0
Function
my_list=["a","b","c","d","e"] def my_new_list(new_list): how should I write the code further so that I get the same elements in new_list as in my_list when I call the function???
6 odpowiedzi
+ 1
new_list = my_list
print (new_list)
0
U'll get this list at runtime if you call your function with your "my_list" as argument.
---
my_new_list(my_list)
---
All operations in function will work with "my_list".
0
@raj it works ..but not when I use it in function
0
what you getting wrong ?
shre you code link please
0
@star lord & tony... u guys are right..if I take my_list as an argument ... but I want to use new_list as an argument
0
ok, use two parameters
my_new_list(my_list, new_list)