What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-03 04:10:06
how to find greatest number in python
Method 1 : Sort the list in ascending order and print the last element in the list. filter_none edit play_arrow brightness_4 # Python program to find largest # number in a list # list of numbers list1 = [10, 20, 4, 45, 99] # sorting the list ... Add solution -
TypeScript 2021-09-30 21:55:04
merge lists c++
// list::merge #include <iostream> #include <list> // compare only integral part: bool mycomparison (double first, double second) { return ( int(first)<int(second) ); } int main () { std::list<double> first, second; first.push_... Add solution -
Javascript 2021-09-27 21:26:03
javascript anagram check
const areAnagram = (str1, str2) => str1.toLowerCase().split('').sort().join('') === str2.toLowerCase().split('').sort().join(''); // Examples areAnagram('listen', 'silent'); // true areAnagram('they see', 'the eyes'); // true areAnagram('n... Add solution -
Python 2021-09-18 08:14:03
python sort list in place
# Basic syntax: your_list.sort() # Example usage: your_list = [42, 17, 23, 111] your_list.sort() print(your_list) --> [17, 23, 42, 111] # If you have a list of numbers that are of type string, you can do the # following to sort them numerically witho... Add solution -
Python 2021-09-15 17:38:02
python ists
my_list = ["banana", "cherry", "apple"] # len() : get the number of elements in a list print("Length:", len(my_list)) # append() : adds an element to the end of the list my_list.append("orange") # inser... Add solution