How to Convert an Int to a List of Ints in Python
The challenge
Given a non-negative integer, return an array / a list of the individual digits in order.
Examples:
123 => [1,2,3]
1 => [1] …
Read Article →
323 articles about python development, tools, and best practices
Given a non-negative integer, return an array / a list of the individual digits in order.
Examples:
123 => [1,2,3]
1 => [1] …
Read Article →
Create a Circular List
A circular list is of finite size, but can infititely be asked for its previous and next elements. This is …
Read Article →Don Drumphet lives in a nice neighborhood, but one of his neighbors has started to let his house go. Don Drumphet wants to build a wall …
Read Article →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 →