先生:すべてのクォートを使いこなす、文字列の魔術師 まなぶ君:Python初心者。「"」と「'」に毎度パニック 第1章:文字列型(str)の世界へようこそ まなぶ君:先生、文字列ってただの文章ですよね? "こんにちは" とか? 先生:その通り。Pythonでは ...
寺田 学です。9月の 「Python Monthly Topics」 は、Python 3. 5で導入され、多くの場面で活用されている型ヒント (Type Hints) について、より良い型ヒントの書き方を紹介します。 Pythonの型ヒントとは Pythonは動的型付け言語です。型を指定せずに変数宣言できます ...
Pythonのコレクション型(list, tuple, str, dict, set)は、 すべてイテラブル です。 listやtupleがforループで回せるのは直感的ですが、「str(文字列)」もイテラブルである点は、初学者にとって一つの発見かもしれません。
鈴木たかのり (@takanory) です。今月の 「Python Monthly Topics」 では、Pythonの型ヒントの最近の動き、比較的新しい型ヒントの機能について紹介します。 本連載でも過去にいくつも型ヒント関連の記事があります。このようによりよいPythonコードを書くための ...
On Python 3.5.1: Windows 7 x64: both pyodbc 3.0.10 and pypyodbc 1.3.3 obtain full column names with the below codes CentOS 7 x86-64 (unixODBC 2.3.1-11.el7): pyodbc 3.0.10 gets full column names, but ...
Python is best thought of as a dynamic but strongly typed language. Types aren’t associated with the names of things, but with the things themselves. This makes Python flexible and convenient for ...