LIMITED TIME OFFER: 50% OFF OF PREMIUM WITH OUR ANNUAL PLAN (THAT'S $294 IN SAVINGS).
GET OFFER

Moma data is different after the cleaning

Screen Link:
https://app.dataquest.io/m/351/cleaning-and-preparing-data-in-python/5/string-capitalization

My Code:

Paste your code here
for i in moma:
    gender = i[5]
    gender = gender.title()
    if not gender:
        gender = "Gender Unkown/Other"
    i[5] = gender
    
    nationality = i[2]
    nationality = nationality.title()
    if not nationality:
        nationality = "Nationality Unknown"
    i[2] = nationality

What I expected to happen:
all gender with empty string should have Gender Unknown/Other

What actually happened:

Paste output/error here
-   'Gender Unkown/Other',
+   'Gender Unknown/Other',
-  ['Looking out from Black\n[variable truncated]
+  ['Looking out from Blac\n[variable truncated]

hi @kangchen1995

Welcome to DataQuest Community!

the only error I could find is spelling mistake in unknown.

■■■■. Thanks, the word spelling is wrong.
Have a good day.

hey @kangchen1995

please advise on correct usage!