Skip to content

Instantly share code, notes, and snippets.

@nutszebra
Created November 20, 2015 09:42
Show Gist options
  • Save nutszebra/d7fb75af7eb1c7bf1d33 to your computer and use it in GitHub Desktop.
Save nutszebra/d7fb75af7eb1c7bf1d33 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Link: http://www.cl.ecei.tohoku.ac.jp/nlp100/
"""
Question 02:
02. 「パトカー」+「タクシー」=「パタトクカシーー」
「パトカー」+「タクシー」の文字を先頭から交互に連結して文字列「パタトクカシーー」を得よ.
"""
word1 = u"パトカー"
word2 = u"タクシー"
print("".join([letter1 + letter2 for letter1, letter2 in zip(word1,word2)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment