Reversing a string in Python is easy. Unfortunately, Python does not make it immediately obvious how to do this with native modules, but no matter. You can use slicing to reverse a string in Python very easily. Continue reading “How To Reverse A String In Python”
Category: Python
How To Find The GCD Of Two Integers In Python
Finding the greatest common divisor (gcd) of two numbers is incredibly useful in math and computer science. The gcd of two integers is the largest integer that divides evenly into both integers with no remainder. There are a multitude of applications for being able to find the gcd of two integers. Here, I will discuss two ways to find the gcd of 2 numbers. Continue reading “How To Find The GCD Of Two Integers In Python”