human
sorting a list in python
assistant
Here is some code to sort a list of strings 'words' such that items starting with 's' come first.

sorted(words, key=lambda x: 'a' + x if x.startswith('s') else 'b' + x)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.