0% found this document useful (0 votes)
8 views1 page

Python String and Function Exercises

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Python String and Function Exercises

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

String and Function

1. Write a lambda function to extract all even numbers from a list using filter().
2. Write a recursive function to find the nth Fibonacci number.
3. Write a program to check if one string is present inside another string.
4. Write a program to replace all vowels in a string with *.
5. Write a Python program to count the number of vowels in a string
6. Write a lambda function to square all elements in a list using map().
7. Write a program to find the longest word in a given sentence using
8. Write a recursive function to calculate the sum of digits of a number.
9. Write a program to remove all digits from a string.
10. Write a program to reverse each word of a sentence.

You might also like