[Tutor] Variable reference

2015-07-06 Thread Suresh Nagulavancha
Hello everyone I want to know about the variables dereference Code is in python 27 Let my variable be foo="hello python" Print foo del foo What del command here actually doing , is it dereferencing or deleting the variable along with value it stored? Thank you Suresh Na

[Tutor] How can I replicate a list in a for loop

2015-02-03 Thread Suresh Nagulavancha
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[