+ 1
a,b,c=0,0,0. Write a python program to print all permutations using those three variables. Output: 000, 001, 002,.......999.
Just give me some logic how can i write a program dor this problm.. thanks
5 Respuestas
+ 3
for i in range(0,10):
for j in range(0,10):
for k in range(0,10):
print(i,j,k,",")
but, the problem was i was unable to print it in single line
+ 3
Thankss allot
+ 2
maybe something like this?
number_list = [f'{a}{b}{c}' for a in range(10) for b in range(10) for c in range(10)]
print(number_list)
+ 2
rockrun print(i,j,k,end=",")
+ 1
thks a lot bro