Python string.title syntax in for loop

Hey guys, I have one problem. I have this code:

negative_words = ["concerned", "behind", "danger", "dangerous", "alarming", "alarmed", "out of control", "help", "unhappy", "bad", "upset", "awful", "broken", "damage", "damaging", "dismal", "distressed", "distressed", "concerning", "horrible", "horribly", "questionable"]


for each_word in negative_words:

At the end I need in list ‘negative_words’ the old words plus old words with first letter to be upper case, so that is .title funciton to my knowledge.

I always get the error: " AttributeError: ‘builtin_function_or_method’ object has no attribute ‘title’ "

What should I change?

.title() is a method, not a instance or class variable.

1 Like

Ok. So how do I get original “negative_words” + the same words with upper case first letter?

I gave a pretty big clue in my answer? Let me ask you this in return: How do you call a method?

Sorry, but I have no idea what are you talking about. In codecademy python course those terms are used just a few times. So I do not know what to associate with them.

But I figured it out on my own because I did not get what are you sayig. But stil thank you very much.