How to use frappe.get_list with filter for multi value in same key?

I try to get list of user but not the Guest and Administrator.
I can use this code to get list of user without Guest:

user_list = frappe.get_list('User', filters = {
  'enabled': 1,
  'name': ['!=','Guest']
})

If I use ‘and’ for name filter it returns the first, but when using ‘or’ returns the last value.

'name': ['!=','Administrator' and 'Guest'] // filter out Administrator
'name': ['!=','Administrator' or 'Guest']  // filter out Guest

How do I use the filter for name is not Guest or Administrator?
Thanks

1 Like

frappe.get_list('User', filters={'name':('not in',('Administrator','Guest'))})

1 Like