I am doing some exercises with datasets like so:
List with many dictionaries
users = [
{\"id\": 0, \"name\": \"Ashley\"},
{\
Time complexity for the lookups in -
But that wouldn't hurt much if your data isn't that big and also modern day processors are quite efficient.
You should go with the one in which the lookup is syntactically cleaner and readable(readability matters).
The first option is quite appropriate as the variable is a collection of users(which have been assigned an id) while the second would be just a collection of usernames and ids.