Im very new to python and playing around with loops and stuck on a basic doubt
Im trying to perform the following:
tup1=()
for i in range(1,10,2):
tup1=(tup1,i)
print tup1
I expect the out put to be the sequence 1 to 10. However i end up with the following:
((((((), 0), 2), 4), 6), 8)
Could you please help me as to if this approach is correct or are there better ways to meet the requirement ?