Solution Exercise 30: search common element in two lists with python
Exercise 30 Write a function in Python that allows to compare two lists and to tell us if these two lists have a common value or not. Solution # define…
Python Courses & Exercises with solutions !
Exercise 30 Write a function in Python that allows to compare two lists and to tell us if these two lists have a common value or not. Solution # define…
Exercise 29 Write a Python program that removes duplicate items from a list. Solution First method # -*- coding: utf-8 -*-# define a function that remove duplicate element in listdef…
Exercise 28 Write a Python program that tests whether a list is empty or not. Same question for a string of characters. Solution First method Try if a list is…
Exercise 27 Write a program in Python as a function that calculates the sum of elements in a list of numbers. And another that multiplies all the elements of a…
Exercise 23 Write a program in Python language that asks the user to enter the name of a file and return the extension. Example if the user enters coursPython.pdf the…
Exercise 26 Write a program that asks the user to enter a text and return all words beginning with the letter a. Solution First method # Ask to type a…
Exercise 25 Write a program that asks the user to enter a word and return the opposite. Example if the user enters the word python, the program returns nohtyp. Solution …