💡 Pythagorean's Challenge 2

import math

def pairs(n):
olist=[]
sr=int(math.sqrt(n))
for i in range(sr+1):
l=[]
for j in range(i,sr+1):
if (ii)+(jj)==n:
l.append(i)
l.append(j)

            olist.append(tuple(l))


for i in olist:
    print(i,end='')

n=int(input())
print("__________")
list=[]
for i in range(n):
n=int(input())
list.append(n)

for i in list:
pairs(i)
print("\r")

i am not able to get rid of space betwwen the “,” and the next number in the tuple. please help

Hello @taresh345,

Kindly provide the code with Coding Blocks IDE .
Thanks :slight_smile:

https://ide.codingblocks.com/s/108304 ,
here is the link ,thank you .

Hello @taresh345,

I have updated your code as you explained in the chat.
And the algorithm is correct as well. Now you can submit it and get your well deserved score. :wink:

Happy Learning :slight_smile:
Thanks