Oct-16-2019, 07:11 PM
you need to swap outer and inner loop
def function_1(): return "Hello Sir", "Hello You", "Hello Mam", "Hello Though" def function_2(): return "Bye to me", "Bye to you", "Bye to everyone", "Bye to noone" for x in function_2(): for y in function_1(): print(y, x)
Output:Hello Sir Bye to me
Hello You Bye to me
Hello Mam Bye to me
Hello Though Bye to me
Hello Sir Bye to you
Hello You Bye to you
Hello Mam Bye to you
Hello Though Bye to you
Hello Sir Bye to everyone
Hello You Bye to everyone
Hello Mam Bye to everyone
Hello Though Bye to everyone
Hello Sir Bye to noone
Hello You Bye to noone
Hello Mam Bye to noone
Hello Though Bye to noone
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs