Extract Lowercase Letters from String

  • Share this:

Code introduction


This function takes a string as input and returns a list of all lowercase letters in the string.


Technology Stack : String, list comprehension

Code Type : Function

Code Difficulty :


                
                    
def ascii_lowercase(input_str):
    """
    获取输入字符串中小写字母的列表。
    """
    result = [char for char in input_str if char.islower()]
    return result