This is my sample piece of code (not full code of my original code just sample of it) I am using python 2.7 Import itertools var=[1,2,3,4,5] Length=int(raw_input("length of possible numbers required")) #This is for length of 3 chars for i in itertools.product(var,var,var): print i[0]+i[1]+i[2]
Here what is my problem is i am unable to replicate the list based on the user input i tried var*length but it is creating a new single list with repeated values , how can i solve this problem?? I want the same original list to be used Thanks in advance _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor