Python: Find the items start with specific character from a given list
Find Items Starting with Specific Character
Write a Python program to find items starting with a specific character from a list.
Sample Solution:
Python Code:
Sample Output:
Original list: ['abcd', 'abc', 'bcd', 'bkie', 'cder', 'cdsw', 'sdfsd', 'dagfa', 'acjd'] Items start with a from the said list: ['abcd', 'abc', 'acjd'] Items start with d from the said list: ['dagfa'] Items start with w from the said list: []
Flowchart:
For more Practice: Solve these Related Problems:
- Write a Python program to find items ending with a specific character in a list.
- Write a Python program to find items containing a specific substring in a list.
- Write a Python program to count how many items in a list start with a specific character.
- Write a Python program to extract items starting with vowels from a list.
Go to:
Previous: Write a Python program to remove duplicates from a list of lists.
Next: Write a Python program to check if all dictionaries in a list are empty or not.
Python Code Editor:
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.