Screen Link:
My Code:
for row in moma:
if row[5] == "":
row[5] = "Gender Unknown/Other"
else:
row[5] = row[5].title()
if row[2] == "":
row[2] == "Nationality Unknown"
else:
row[2] = row[2].title()
print(row[2], row[5])
What I expected to happen:
I expected to get an error due to line 7
row[2] == “Nationality Unknown”
What actually happened:
No error reported.
code run and I got the output
Replace this line with the output/error
American Male
German Male
Brazilian Male
British Male
French Male
American Gender Unknown/Other
Nationality Unknown Gender Unknown/Other
Colombian Male
American Male