a=[2,2,4,1]
b=a
a.sort()
// a now points to object [1,2,2,4]
c=sorted(b)
//c and b also points to [1,2,2,4]
// sort works on array only but sorted also on strings but return array of char
s="sjndk"
print(sorted(s))
// prints ['d', 'j', 'k', 'n', 's']
// sorted also works on list of strings(sorts alphabetically)
// for 2 strings s1 and s2 to be anagrams
// both conditions should be True
// 1 their length is same or
len(s1)==len(s2)
// 2 rearranging chars alphabetically make them equal or
sorted(s1)==sorted(s2)