Guest User

Untitled

a guest
Jul 19th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. list = ['(有)こんにちは', '(株)さようなら']
  2. for i in range(len(list)):
  3. if '(有)' in str(list[i]):
  4. list[i] = list[i].replace('(有)', '有限会社')
  5. elif '(株)' in str(list[i]):
  6. list[i] = list[i].replace('(株)', '株式会社')
  7. print('\n'.join(list))
  8. >>>
  9. 有限会社こんにちは
  10. 株式会社さようなら
Add Comment
Please, Sign In to add comment