Results of 1 - 1 of about 1 for playlist (0.006 sec.)
- What's New In Python 3.12 9414
- What's New In Python 3.12 編集者 : Adam Turner この記事では Python 3.11 と比較した Python 3.12 の新機能を解説します。Python 3.12 は2023年10月2日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP 693 -- Python 3.12 リリ
...ようなことができるようになりました: >>> songs = [ 'Take me back to Eden' , 'Alkaline' , 'Ascensionism' ] >>> f "This is the playlist: { ", " . join ( songs ) } " 'This is the playlist: Take me back to Eden, Alkaline, Ascensionism' この変更以前は、 f-strin...くなっていました。 Python 3.12 では、複数行にまたがる f 文字列を定義し、インラインコメントも追加できます。 >>> f"This is the playlist: {", ".join([ ... 'Take me back to Eden', # My, my, those eyes like fire ... 'Alkaline', # Not acid nor alkaline ... 'Asce...nsionism' # Take to the broken skies at last ... ])}" 'This is the playlist: Take me back to Eden, Alkaline, Ascensionism' バックスラッシュと Unicode 文字: Python 3.12 より前は、f 文字列内の式に \ を... - https://man.mtool.work/python/3.14/whatsnew/3.12.html
PREV
1
NEXT