I am new to Python.I want to sort a list with certain condition. ex:
I am getting the environment details and storing them as list as below.
ls = ['qa','uat','prod','dev']
They can be any order.
ls = ['uat','qa','dev','prod']
But the result list should be:
rls = ['prod','qa','uat','dev']