How to Check if String is a Palindrome in Python
The challenge
Write a function that checks if a given string (case insensitive) is a palindrome.
The solution in Python
Option 1:
def …
Read Article →
In-depth guides, insights, and best practices for modern software engineering
Write a function that checks if a given string (case insensitive) is a palindrome.
Option 1:
def …
Read Article →
Complete the function that takes an odd integer (0 < n < 1000000) which is the difference between two consecutive perfect squares, …
When given a string of space-separated words, return the word with the longest length.
If there are multiple words with the longest …
Read Article →Implement a function that calculates the sum of the integers inside a string. For example, in the string …
Read Article →Complete the solution so that it reverses the string passed into it.
'world' => 'dlrow'
'word' => …
Read Article →
You must implement a function that returns the difference between the biggest and the smallest value in a list(lst) received as a …
Read Article →Given a string and an array of integers representing indices, capitalize all letters at the given indices.
Example: …
Read Article →Modify the spacify function so that it returns the given string with spaces inserted between each character.
spacify("hello …
Read Article →
For a given list [x1, x2, x3, ..., xn] compute the last (decimal) digit of x1 ^ (x2 ^ (x3 ^ (... ^ xn))).
Example:
last_digit({3, 4, 2}, …
Read Article →
You are given two arrays a1 and a2 of strings. Each string is composed of letters from a to z. Let x be any string in the first array …
An array is circularly sorted if the elements are sorted in ascending order but displaced, or rotated, by any number of steps.
Complete …
Read Article →You are be given a string that has lowercase letters and numbers. Your task is to compare the number groupings and return the largest …
Read Article →