Simple and short code examples to find the root directory of your project in different ways. This can be useful in projects where you are reading or writing data to directories inside your project ...
Pythonで文字列を扱うとき、その文字列が特定の文字で『始まる』か(startswith)、あるいは『終わる』か(endswith)を調べるのは簡単ですよね。でも、一番やりたいのは、始まりや終わりに関係なく、『途中に特定のキーワードが含まれているか』のチェック ...