Solution Exercise 38: algorithm python to find the longest word
Exercise 38 Write a Python program to find the longest word on a string. Solution: def longestWord(s): # Converting the string s to a list L = s.split() # define…
Python Courses & Exercises with solutions !
Exercise 38 Write a Python program to find the longest word on a string. Solution: def longestWord(s): # Converting the string s to a list L = s.split() # define…
Exercise 37 Write a Python program that creates a list whose elements are the common words to two strings s1 and s2. Solution def commonWords(s1 , s2): listCommonWords = []…
Exercice36 Write a program in Python to delete multiple spaces in a string Solution: # Example of strings containing multiple spacess = " Python is object oriented a programming language"#…
The os module is a module provided by Python whose purpose is to interact with the operating system, it thus makes it possible to manage the tree structure of files,…
1 - What is a Python module ? A module in Python is simply a file made up of Python code that you can call and use its code without…
Content About Inheritance In OOP Python How To Us The Inheritance In OOP Python Multiple inheritance 1. About Inheritance In OOP Python To avoid copying the code of a class,…
Contenu du cours what is pass instruction Examples of use of pass instruction 1. what is pass instruction In computer programming, the "pass" instruction is a statement that does nothing.…