What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-27 06:20:31
smallest and largest number
# Python program to find largest # number in a list # list of numbers list1 = [10, 20, 4, 45, 99] # sorting the list list1.sort() # printing the last element print("Largest element is:", list1[-1]) Add solution -
Python 2022-03-17 02:55:09
Check if a string is lapindrome or not in Python
s=input() s1,s2='','' if(len(s)%2==0): s1=s[:len(s)//2] s2=s[len(s)//2:] else: s1=s[:len(s)//2] s2=s[len(s)//2+1:] l1=list(s1) l2=list(s2) l1.sort() l2.sort() s1=str(l1) s2=str(l2) if(s1==s2): print('YES') else: print('NO') Add solution -
Python 2022-03-13 07:05:06
second max from list python
# Python program to find largest # number in a list # list of numbers list1 = [10, 20, 4, 45, 99] # sorting the list list1.sort() # printing the second last element print("Second largest element is:", list1[-2]) Add solution -
Javascript 2022-02-13 18:35:21
how the sort function works javascript
const unsorted = ['d', 'd', 'h', 'r', 'v', 'z', 'f', 'c', 'g']; const sorted = unsorted.sort(); console.log(sorted); //["c", "d", "d", "f", "g", "h", "r", "v", "z"]... Add solution