Difference between sorted and sortBy?

We use sorted in Pyspark and SortBy in scala, is there any functional difference in the two?

@Varun_Joshi,

There is no difference in both. Both used to sort items in list with desired order.