Learn how to use Python to truncate a float using the int function, math library, string functions, f-strings, and truncate lists of numbers.
Learn how to use the Python isdigit, isnumeric, and isdecimal methods to check whether or not a string is a number and their differences.
Learn how to use Python to remove special characters from a string, including how to do this using regular expressions and isalnum.
Learn to use Python to lowercase text, using the lower and caseload functions, checking if strings are lower and converting lists to lower.
Learn how to use Python and Pandas to convert a dataframe column values to strings, including how to optimize for memory and efficiency.
Learn how to use Python to shuffle a list, including being able to reproduce a given result and shuffling Python lists of lists.
Learn how to use Python to check if a string is a palindrome, using string indexing, for loops, the reversed function in Python!
Learn how to use Python to find all permutations of a string, including using itertools, recursion, and a Python for loop.
Learn to use Python to remove punctuation from a string, including using translate, regular expressions, and more – and which way is fastest!
Learn how to find the index of the first or last substring of a string using Python. Also learn how to find all indices of a substring.
In this post, you’ll learn how to use Python to remove newline characters from strings, including how to replace all or trailing newlines.