1. Find if a list is sorted in increasing order in python
Answers
Answered by
0
Answer:
You can just use lst. sort() . Python's sort implementation (TimSort) check if the list is already sorted. If so sort() will completed in linear time.
Explanation:
hope it is helpful mark as brainleist
Answered by
2
HOPE IT HELPS :
Code For sorting a random list in ascending order :
a = list ( eval ( input ( 'Enter a random list : ') ) )
a = a.sort()
print (' Numbers in ascending order are as follows : ')
For i in a :
print( i , end = " " )
STAY HOME STAY SAFE
x JOKER ALWAYS x
Similar questions
English,
5 months ago
Accountancy,
5 months ago
English,
10 months ago
Social Sciences,
10 months ago
Sociology,
1 year ago