{"type":"rich","provider_name":"Hatena Blog","categories":["Python"],"blog_url":"https://potisan-programming-memo.hatenablog.jp/","description":"\u6587\u5b57\u5217\u306e\u4e00\u90e8\u3092\u53d6\u308a\u51fa\u3059 \u30b9\u30e9\u30a4\u30b9\u3092\u4f7f\u3044\u307e\u3059\u3002 s = \"abcde\" #\u5148\u982d\u306e\u6587\u5b57 s[1] s[1:] #\u672b\u5c3e\u306e\u6587\u5b57 s[-1] s[-1:] #\u5148\u982d\u304b\u3089n\u6587\u5b57\u76ee s[n] s[n:] #\u672b\u5c3e\u304b\u3089n\u6587\u5b57\u76ee s[-n] s[-n:] #\u5148\u982dn\u756a\u76ee\u304b\u3089m\u6587\u5b57 #\u672b\u5c3en\u756a\u76ee\u304b\u3089m\u6587\u5b57 \u6587\u5b57\u5217\u914d\u5217\u304b\u3089\u672b\u5c3e\u304c\u7279\u5b9a\u6587\u5b57\u306e\u8981\u7d20\u3092\u629c\u304d\u51fa\u3059 \u5185\u5305\u8a18\u6cd5\u3092\u4f7f\u3044\u307e\u3059\u3002 ss = ['A;','B','C','D;','EF','G;'] [s for s in ss if s[-1]==';'] [s[:-1] for s in ss if s[-1]==';'] \u9589\u3058\u308b\u524d\u63d0\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f with\u69cb\u6587\u69cb\u6587\u3092\u4f7f\u3044\u2026","image_url":null,"provider_url":"https://hatena.blog","width":"100%","version":"1.0","title":"Python 3\u57fa\u790e\u4e8b\u9805\u306e\u899a\u3048\u66f8\u304d","author_url":"https://blog.hatena.ne.jp/potisan/","author_name":"potisan","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2019%2F01%2F25%2F183531\" title=\"Python 3\u57fa\u790e\u4e8b\u9805\u306e\u899a\u3048\u66f8\u304d - potisan\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","published":"2019-01-25 18:35:31","url":"https://potisan-programming-memo.hatenablog.jp/entry/2019/01/25/183531","blog_title":"potisan\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e1\u30e2"}