T
tom
Hi!
My code is
And it gives following error:
How can sortedList variable turn into NoneType? I just don't get it...
My code is
> db = {}
>
def display():
keyList = db.keys()
sortedList = keyList.sort()
for name in sortedList:
line = 'Name: %s, Number: %s' % (name, db[name])
print line.replace('\r', '')
And it gives following error:
for name in sortedList:
TypeError: 'NoneType' object is not iterable
How can sortedList variable turn into NoneType? I just don't get it...