Skip to content

929. Unique Email Addresses#14

Open
tarinaihitori wants to merge 1 commit intomainfrom
929-unique-email-address
Open

929. Unique Email Addresses#14
tarinaihitori wants to merge 1 commit intomainfrom
929-unique-email-address

Conversation

@tarinaihitori
Copy link
Copy Markdown
Owner

新しい変数を使用することにより、可読性や変数の中身が追いやすいと思い、processed_local という新しい変数を用意した。
split 関数や replace 関数も軽く読んだ。
https://docs.python.org/3.12/library/stdtypes.html#str.split

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あ、そうですね。リファレンスを読むのは大事です。

他の解き方としては、ステートマシンと正規表現があるかなと思います。
Discord を漁ると出てくると思います。

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。
もう一度Discord漁ってみます。

2nd
1st を読みやすくする。
local という変数に再代入することも考えたが、
新しい変数を使用することにより、可読性や変数の中身が追いやすいと思い、processed_local という新しい変数を用意した。
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python は比較的再代入を厭わない傾向があるように思いますが避けてもいいでしょう。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants