Skip to content

Instantly share code, notes, and snippets.

@tana9
Last active March 24, 2020 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tana9/288887ebf96e6107ad8eb2e9904d209b to your computer and use it in GitHub Desktop.
Save tana9/288887ebf96e6107ad8eb2e9904d209b to your computer and use it in GitHub Desktop.
def main():
addresses = [
"北海道札幌市中央区大通西28−2−5",
"北海道札幌市中央区南13条西13−2−10",
"北海道札幌市中央区南10条西9−1−48",
"北海道札幌市中央区南18条西8−1−43",
"北海道札幌市中央区双子山2−3−12",
"北海道札幌市中央区北14条西15−3−13",
"北海道札幌市中央区南29条西10−2−5",
"北海道札幌市中央区旭ケ丘1−11−20",
"北海道札幌市中央区宮の森1条11−3−12",
"北海道札幌市中央区宮の森4条12−6−21",
"北海道札幌市中央区南24条西12−5−28",
"北海道札幌市中央区南4条西23−2−21",
"北海道札幌市中央区南15条西6−1−1",
"北海道札幌市中央区北8条西18丁目2番1外",
"北海道札幌市中央区宮の森1条14−3−25",
]
address = []
for c in zip(*addresses):
if len(set(c)) != 1:
break
address.append(c[0])
print("".join(address))
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment