Why is method sort() 's parameters key,reverse.. marked red?

Answered

I'm new python and i'm using Python 3.6 on Pycharm

When i try

sorted(lst, key=len, reverse=False)

or

x.sort(key=len)

key and reverse marked red.But it works fine

I thought this was a very basic method.Why Pycharm not support?

Should I install any plugin?or import any packages?

1
1 comment

Hi,

What is your PyCharm version?

Try File | Invalidate Caches / Restart... and see if it helps.

0

Please sign in to leave a comment.