A program contains a 2-dimensional data structure named theAstronauts which stores the first name, last name, and year of selection for a group of astronauts.
An example of the data structure is shown below:
theAstronauts = [
["Helen", "Sharman", 1989],
["Yuri", "Gagarin", 1960],
["Mae", "Jemison", 1987],
["Tim", "Peake", 2009],
["Sally", "Ride", 1978]
]
theLabels = []
Mission badges require a unique label to be generated for each astronaut. The label is created by joining:
For example, the label for ["Helen", "Sharman", 1989] would be "SH1989".
Write a program in Python or a standard pseudocode to:
theAstronauts to generate their unique label.theLabels.Your program must function correctly even if theAstronauts contains a different number of records or different data.