前回の第7回は、 Dateクラスを使って日付を調べ、 アナログ時計のTextFieldに表示させた。今回は、 Stringクラスにより文字列を操作して、 日付のフォーマットに手を加え、 その処理を関数としてまとめてみたい。 Stringクラスを使った文字列の一部取出し 第7回 ...
みんなのPython 第5版、予約受付中です。 Pythonにt文字列(template strings)が追加されます。 見た目はf文字列に似ていますが、最初にtを加えたリテラルで表記します。また、f文字列はその場で評価されますが、t文字列はTemplateオブジェクトになるのが大きな ...
# You are given a string, S, and a list of words, L, that are all of the same length. # Find all starting indices of substring(s) in S that is a concatenation of each word # in L exactly once and ...