Davood Riazi

Davood Riazi

  • NA
  • 474
  • 203.5k

How do I write a function in Python to get a list as input

Sep 25 2018 2:18 PM
How do I write a function in Python to get a list as input and then reverse all of the list items ?
 
Hi, anyone can help me to solve this:

How do I write a function in Python to get a list parameter (n) as input and then reverse all of the list items ?

for example :

input : ‎{'n': [5, 143, 2678, 98, 1616, 666]}

output : ‎[5, 341, 8762, 89, 6161, 666]

Thanks in advanced

Attachment: reverse_list.rar

Answers (2)