fork download
  1. import re
  2. my_opts = [
  3. 'opt_tw',
  4. 'opt_ls_join',
  5. 'opt_ac_join',
  6. 'opt_pan_join',
  7. 'opt_full_led',
  8. ]
  9. print( [x[4:] for x in my_opts if x.startswith('opt_') and not x.endswith('_join')] )
  10.  
Success #stdin #stdout 0.03s 9364KB
stdin
Standard input is empty
stdout
['tw', 'full_led']