itemgetter that caters for items that are ‘None’
Return a callable object that fetches the given item(s) from its operand. After f = itemgetter(2), the call f(r) returns r. After g = itemgetter(2, 5, 3), the call g(r) returns (r, r, r)
When using itemgetter as the key when sorting, Python3 can not compare values to NoneTypes. This version of itemgetter returns “” whenever a value of None is present.