Using sort()


when I tried to print

inventory[ ‘backpack’].sort()

Its return None, is this correct to use sort function with list value?

14. It's Dangerous to Go Alone! Take This

Hi @khamism,

You displayed the returned value of the .sort() method, which is None.

First, call .sort() on inventory[‘backpack’], then print it, separately.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.