Find the missing element between two arrays in Python
The challenge
Given two integer arrays where the second array is a shuffled duplicate of the first array with one element missing, find the missing …
Read Article →320 articles about python development, tools, and best practices
Given two integer arrays where the second array is a shuffled duplicate of the first array with one element missing, find the missing …
Read Article →Remove a exclamation mark from the end of string. You can assume that the input data is always a string, no need to verify it.
Create a function close_compare that accepts 3 parameters: a, b, and an optional margin. The function should return whether a is lower …
You’re re-designing a blog and the blog’s posts have the following format for showing the date and time a post was made: …
Read Article →Create a method that accepts a list and an item, and returns true if the item belongs to the list, otherwise false.
list = …
Read Article →
Create a function called shortcut to remove all the lowercase vowels in a given string.
shortcut("codewars") # --> …
Read Article →
In this tutorial, you will learn how to sort a list in Python, by following the below three steps:
Your task is to create functionisDivideBy (or is_divide_by) to check if an integer number is divisible by each out of two arguments.
A …
Read Article →6174 is known as Kaprekar’s constant after the Indian mathematician D. R. Kaprekar. This number is notable for the following rule: …
Read Article →Given a string s, write a method (function) that will return true if its a valid single integer or floating number or false if its not. …
Read Article →Generally, you want to use the built-in sorted() function which takes a custom comparator as its parameter. We need to pay attention to the fact that …
Let’s say that you have an integer with value of 9271 and you want to sort it either ascending(1279) or descending(9721).
How would you do this …
Read Article →