def user_name(): arr = [] for user in psutil.users(): if str(user[0]) is not 'None' and user[0] not in arr: arr.append(user[0]) return arr