0

Easy python question

friends = [“kevin”, “karen”, “jim”, “toby”] friends.sort() print(friends) Thats correct but when i write this one; print(friends.sort()) It says “None” Why can someone explain??

14th Sep 2020, 6:54 AM
Bilgenur Çelik
Bilgenur Çelik - avatar
1 Odpowiedź
+ 2
Sort is a method which sorts the items in list and this method returns None. So if you try to print it, it will output None
14th Sep 2020, 7:08 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar