+ 1

How can i print 1 2 then 2 3 and onward without using 'and ' 'or' operator

It means I want to print 1 2 , 2 3 , 3 4 and further but with 'and' 'or' operator code is getting bigger is their any other method to do this

28th Dec 2019, 8:56 AM
Vishal Pandey
Vishal Pandey - avatar
2 Antworten
0
Vishal Pandey For i in range(5) #or any number you want Print(str(i)+' '+str(i+1)) It works for me
28th Dec 2019, 9:42 AM
iren yeger
iren yeger - avatar