SHARE
TWEET

Untitled

a guest Jun 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. * [context......
  2.      
  3. list = [i[3].capitalize() for i in list]
  4.      
  5. list1 = [ "* [context......", "* [context1......" ]
  6.  
  7. for x in list1:
  8.  
  9.     print(x[:3] + x[3].capitalize() + x[4:])
  10.      
  11. * [Context......
  12. * [Context1......
  13.      
  14. >>> my_list = ['* [foo]', '* [bar]']
  15. >>> map(lambda s: s.title(), my_list)
  16. ['* [Foo]', '* [Bar]']
  17.      
  18. >>> [s.title() for s in my_list]
  19. ['* [Foo]', '* [Bar]']
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top