CM
Claire M. von SecondLife
@clairemsl.bsky.social
(She/her). A girl living in Second Life. A Resident Cartographer. And oftentimes a ponygirl as well.
Works in IT in First Life. Doing lots of Python.
My posts may contain NSFW images which I will mark accordingly.
136 followers48 following1.3k posts
#PythonTips Do you know you can use f-string to directly format a datetime object? So, assuming `dt` is a datetime object, Rather than doing this: print("Date is", dt.strftime("%Y-%m-%d")) You can do this instead: print(f"Date is {dt:%Y-%m-%d}")
F strings ftw
CM
Claire M. von SecondLife
@clairemsl.bsky.social
(She/her). A girl living in Second Life. A Resident Cartographer. And oftentimes a ponygirl as well.
Works in IT in First Life. Doing lots of Python.
My posts may contain NSFW images which I will mark accordingly.
136 followers48 following1.3k posts