Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在の月と年を、2013 年 1 月を意味する Jan13 のような形式で表示したいだけです。ちなみに、これは現地時間である必要があります。
これは非常に簡単です。日時のドキュメントを参照してください。
>>> from datetime import datetime >>> datetime.now().strftime("%b%y") 'Jan13'