venkatasai1432

Results 3 comments of venkatasai1432

a='' for i in range(1000,3001): if i%2==0: a=a+str(i) a=a+str(',') print(a) it works

a=[] for i in range(1000,3001): if i%2==0: a=a+[str(i)] print(','.join(a)) Is it ok OR can you want another one ?

Hi, It returns syntax error because i is not declared there the below one return the output as expected Result = [ i for i in range(1000, 3001) if i%2...