In Python, you can use a built-in function 'reversed', which will return a new list with reversed

preview_player
Показать описание
#python #pythonprogramming #pythoncodin
Рекомендации по теме
Комментарии
Автор

It is not broken. And your c is None.
list.reverse() is an inplace method that will reverse original list. It will not return new list. It will modify existing list.
The same as calling list.append(x) will add x to the list. It will NOT return new list. It will modify existing list.
Stop saying something is broken when it clearly not!

doltramir
Автор

Also my_list[::-1]. But using the function is clean and simple

krymgand
Автор

.
*No comments yet*
_Say something to start the conversation_

Human_ver-..