Im trying to print out all elements in a list, in Python, after I´ve appended one list to another. The problem is that it only prints out every element when I use PRINT inst
def union(a,b): a.extend(b) for item in a: print item, return a a=[1,2,3,4] b=[4,5,6] union(a,b)
prints
1 2 3 4 4 5 6