Using python to print pairs(x,y) which add up to a certain number. Like if user inputs n=5 as,then we should get the output as [[1,4],[2,3],[3,2]]
n= int(input())
a=[[i,j] for i in range(1,m+1) if i+j=m]
print(a)
Please let me know where my snippet goes wrong. I want to try it using list comprehension only.