29 lines
799 B
Python
29 lines
799 B
Python
|
|
print("Process fNames")
|
|
|
|
fNames = [ "Harry Bigos", "Moe Howard", "Katrina Smith", "Colorado Jones", "Shenanigans Davis", "Tracey Carter"]
|
|
counter = 0
|
|
|
|
|
|
print("\nThe length of the list is {}\n".format(len(fNames)))
|
|
|
|
while(counter < len(fNames) ):
|
|
print("Counter = ",counter)
|
|
print("fNames[{}] = {}".format(counter,fNames[counter]))
|
|
counter = counter + 1
|
|
|
|
print("Process list - sorted - but doesn't work right")
|
|
|
|
fNames.sort()
|
|
counter = 0 ;
|
|
|
|
|
|
print("\nThe length of the list is {}\n".format(len(fNames)))
|
|
|
|
while(counter < len(fNames) ):
|
|
print("Counter = ",counter)
|
|
print("fNames[{}] = {}".format(counter,fNames[counter]))
|
|
counter = counter + 1
|
|
|
|
print("Problem: How do we sort both lists and keep the first and last names together.")
|
|
print("One solution: Redefine the data.")
|