Solution Exercise 24 : try if a string is a palindrome
Exercise 24 A palindrome is a word whose order of letters remains the same whether it is read from left to right or from right to left. For example: 'laval',…
Python Courses & Exercises with solutions !
Exercise 24 A palindrome is a word whose order of letters remains the same whether it is read from left to right or from right to left. For example: 'laval',…
Exercise 22 Write a program in Python, which returns the first word of a given text. Example for the text: t = 'Python is a wonderful programming language', the program…
Exercise 21 Write a program in Python language, which allows you to count the number of vowels in a given string. Example for the string s = 'anticonstitutionally' the program…
Exercise 20 Write a program in Python language, to exchange the first and last characters of a given string. Solution # define example of string ss = "my-courses.net"# getting the…
Exercise 18 Write a program in Python that asks the user to enter a string s and return a message indicating whether the string contains the letter 'a' by indicating…
Exercise 19 Write a program in Python that lists the strings that make up the list l = ["laptop", "iphone", "tablet", "printer", "Ipad"] by indicating the length of each string.…
Exercise 17 Write a program in Python to display for a given string the number of occurrences of each character in the string.Example for the string s = "Python.org" the…