THIRD ASSIGNMENT 1)Python function that takes a list of words and return the longest word and the length of the longest one. SOL: l = input().split() ans = "" length = 0 for i in l: if(len(i)>length): length = len(i) ans = i print(ans,length) 2)Python function to remove the nth index character from a nonempty string. SOL: l = list(input("Enter the non-empty string : ")) n = int(input("Enter the nth index : ")) l.remove(l[n]) res = "".join(l) print(res) 3) Python function to get the last part of a string before a specified character. SOL: s = input("Enter the string : ") spec = input("Enter the specified character : ") ind = s.find(spec) print(s[ind + 1:]) 4)Python function to sort a string lexicographically. SOL: s = list(input("Enter the string : ")) s.sort() print("".join(s)) 5) Python function to remove spaces from a given string. SOL: s = input("Enter the string : ").split() print("Answer = ","".join(s))