Write a program that prints the longest substring of s in which the numbers occur in descending order
Question 2
Assume s is a string of numbers.
Write a program that prints the longest substring of s in which the numbers occur in descending order. For example, if s = '561984235870154755310', then your program should print
Longest substring in numeric descending order is: 755310
In the case of ties, print the first substring. For example, if s = '742951', then your program should print
Longest substring in numeric descending order is: 742
Hint
Management Code#s='561984235870154755310's = '742951'#set maxNum number to a higher number than can be found in sequencemaxNum=10#holds the longest run of descending substringlongestRun=''#holds the current run of descending substringcurrRun=''...