Please let me know how to sort the list of String in either ascending / descending order without considering special characters and case.
ex: list1=['test1_two','testOne','testTwo','test_one']
Applying the list.sort /sorted method results in sorted list ['test1_two', 'testOne', 'testTwo', 'test_one']
but the without considering the special characters and case it should be
['testOne','test_one', 'test1_two','testTwo'] OR ['test_one','testOne','testTwo', 'test1_two' ]

list.sort /sorted method sorts based on the ascii value of the characters but Please let me knwo how do i achieve my expected one

your question was answered in devshed

A helper function will do:

sort only the alphabetic part of a word
['test1_two', 'testOne', 'testTwo', 'test_one']
['testOne', 'test_one', 'test1_two', 'testTwo']

def alpha_only(word):
    helper function to sort only the alphabetic part of a word
    word = "".join(c for c in word if c.isalpha())
    return word.lower()

list1 = ['test1_two','testOne','testTwo','test_one']
list2 = sorted(list1, key=alpha_only, reverse=False)

['testOne', 'test_one', 'test1_two', 'testTwo']