With the new information in mind, that:
list1's elements are of the form (name, last_name, gender, job_class, salary),
list2 is contains elements of the form (name, last_name, increase) (presumably a raise for a person),
list3 is has elements like (job_class, bonus),
... you may benefit in both performance and code clarity using a dict.
Using a tuple of the form (first,last) to reference each person in your program, you can do something like this (in a basic example with input to get information):
people = dict()
for i in range(num_ppl):
name = tuple(input().split()) # input is something like "Bob Smith"
people[name] = getPeopleInfo() # read gender, job_class, salary, etc. and make a list
for i in range(num_raises):
first, last, increase = input().split()
people[(first,last)][-1] *= float(increase)
for i in range(num_bonuses):
job_class, bonus = input().split()
for name in people: # iterating through a dict gives the keys (similar to indices of a list, but can be immutable types such as tuples)
if people[name][2] == job_class:
people[name][-1] += bonus
Any immutable type such as str, int and tuple can be used as a key in a dict, similar to the 0-based integers used for a list. Note that a list can change (e.g. using list.append) and is "mutable"; therefore a list cannot be a key. For more information about dict you can read up on the documentation.
if (a==a2) and (b==b2), but I agree that OP should clarify.