The easiest to understand is to Use a function
def get_one_salary(ctr):
while True: ##infinite loop
salary=raw_input("enter the salary #%d: " % (ctr+1))
try:
salary = float(salary)
return salary
except ValueError:
print "could you please enter the correct salary? "
n = int(raw_input("enter the number of employee: "))
salary = []
for ctr in xrange(n):
input_value = get_one_salary(ctr)
salary.append(input_value)
print salary