List Sorting
<code>l=list(input())
func=input('Choose a function: asc/desc/none= ')
none=l
asc=l.sort()
desc=l.reverse()
if func.lower() =='asc':
print(asc)
elif func.lower() =='desc':
print(desc)
elif func.lower()== 'none':
print(none)
else:
print('Please select one of the showen options ')
</code>
<code>l=list(input())
func=input('Choose a function: asc/desc/none= ')
none=l
asc=l.sort()
desc=l.reverse()
if func.lower() =='asc':
print(asc)
elif func.lower() =='desc':
print(desc)
elif func.lower()== 'none':
print(none)
else:
print('Please select one of the showen options ')
</code>
l=list(input())
func=input('Choose a function: asc/desc/none= ')
none=l
asc=l.sort()
desc=l.reverse()
if func.lower() =='asc':
print(asc)
elif func.lower() =='desc':
print(desc)
elif func.lower()== 'none':
print(none)
else:
print('Please select one of the showen options ')
*The problem that I faced:
*
- So I tried to write a code about list sorting which I choosed asc for ascending numbers in list,desc for descending numbers and none for list itself. But whenever I wrote other functions in code(input), it always outputs none. How can I fix this issue? These are the details about code:
[List sorting](https://i.sstatic.net/1foQBv3L.png)
https://www.linkedin.com/pulse/7-python-coding-challenges-beginners-nancy-j
New contributor
Fatima Bayramova is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.