Longest run of a repeated character
Write a Python program to find the character that repeats most times in a row (consecutively) in a...
Online Learning Platform
Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.
Write a Python program to find the character that repeats most times in a row (consecutively) in a...
Write a Python program to find the least frequent character in a string. Step-by-step explanation, colour-coded code and real output.
Write a Python program to count how many times a whole word occurs in a string. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the position (word number, starting at 1) of a word in a sentence. Step-by-step explanation, colour-coded code and real output.
Write a Python program to convert number words into a number. Step-by-step explanation, colour-coded code and real output.
Write a Python program to format a float to 3 decimal places and convert it to a string. Step-by-step explanation, colour-coded code and real output.
Write a Python program to split a string into words and join them with "-". Step-by-step explanation, colour-coded code and real output.
Write a Python program to remove newline characters from a string. Step-by-step explanation, colour-coded code and real output.
Write a Python program to convert all the characters in a string to uppercase. Step-by-step explanation, colour-coded code and real output.
Write a Python program to exchange the first and last letters of a string. Step-by-step explanation, colour-coded code and real output.
Write a Python program to check whether a string contains special characters. Step-by-step explanation, colour-coded code and real output.
Write a Python program to remove duplicate characters, keeping the first occurrence of each. Step-by-step explanation, colour-coded code and real output.
Take free timed mock tests with answers and explanations.