initials(names) that turns each full name (two or more words) into its uppercase initials joined by dots, e.g. 'Rahul Kumar' → 'R.K', using a comprehension (an inner join over the split words).initials(['Rahul Kumar', 'priya n sharma'])
['R.K', 'P.N.S']
First letters of every word, uppercased, dot-joined.
'.'.join(...) can consume a generator of first letters.
w[0].upper() for w in name.split().