Question: Get input from user in the form of list and arrange the elements of the list according to the ascending and descending order.

```
   list = eval(input("Enter the elements of the list")) 
   a = list.sort() 
   print("Sorted in ascending order: ", a) 
   d = list.sort(reverse = True) 
   print("Sorted in descending order: ", d) 

```

This is the code I tried, but it shows error. Can you please help me?