144k views
5 votes
Code a program that gets all possible solutions of a string using 3 for loops. Actual question attached

Code a program that gets all possible solutions of a string using 3 for loops. Actual-example-1

1 Answer

4 votes


\tt x=int(input(


\tt y=int(input(


\tt z=int(input(


\tt for\:x\:in\: range (3):


\quad\tt for\:y\:in\:range(3):


\quad\quad\tt for\:z\:in\:range(3):


\quad\quad\quad\tt if\:x!=y\:and\:y!=z\:and\:z!=x:


\quad\quad\quad\quad\tt print(x,y,z)

User Soumalya Banerjee
by
5.7k points