for row in moma: gender = row gender = gender.title() if not gender: gender = "Gender Unkown/Other" row = gender nationality = row nationality = nationality.title() if not nationality: nationality = "Nationality Unknown" row = nationality
What I expected to happen:
What actually happened:
Value of moma is not what we expected.
Hi fellow DQ-students,
my code is not returning the expected result & I can’t see what is the problem. From my understanding everything is fine? Do I miss something?
Additional question about the structure of the question. Why do we first title case the gender/elements instead of a first check if the element is not empty & do the title case after that?
Thanks in advance.