print()
does not return anything (by default, it returns None
). So then when you do achievements[achievename] = achievedesc
, python is actually making this:
{None:None}
Then you're doing:
print('Achievement Name: ' + x + '\tFor: ' + achievements[x])
Where x
is the key None
and achievements[x]
is the value (which is also None
)
But you can't concatenate a string and a NoneType (hence the error).
So pretty much, your code in simplest form (as an example), you're trying to do this:
print('Hello' + None)
To solve this, you can make AweInspiring
and BeingAwesome
empty strings:
AweInspiring = ''
BeingAwesome = ''