Lambda fucntio example of sorted function i dont understand how the output was generated first ram ,1 was there how

i didnot understand this example
a=[(“jatin”,5),(“ram”,1)]

sorted(a,key=lambda x : x[1])

how the output was generated