I LOVE THIS Formatting Trick In Python

preview_player
Показать описание
I love this formatting trick in Python! #Python #Code #Programming
Рекомендации по теме
Комментарии
Автор

Oh wow, I usually use strftime for that

akex
Автор

Nice. You can even store it in a variable and use it where you want.

django
Автор

this is 1 of the many reasons why i love python while being stuck on learning next.JS and dependencies like emotion and graphql oof...

RIP Python... I shall forever miss making sample websites in Django!

Across_
Автор

i need it so much thanks really helpful

kite
Автор

shorts videos are helping a lot thanks

kartikeyachoudhary
Автор

I learn useful thing from your little videos. Never stop 😊🔥

Dev.dextra
Автор

Would interesting to know if this is possible with your own custom made string/objects?

hakbu
Автор

Another cool formtting trick

name = "John"
age = 50
print(f"{name = }") # name = "John"
print(f"{age = }") # age = 50

orr
Автор

If only that was how dictionaries worked

fenderrexfender
Автор

Can you do formats for time conversion? GMT +2 to CET, for example?

zyfryth
Автор

so month and day are lower case but YEAR, HOURS, MINUTES and SECONDS are upper case

Alchemist
Автор

Is there a way to do this with your own objects?

eamonburns
Автор

Strftime('%Y:...') this is another method

boopalanpichandi
Автор

You made a mistake, month comes before day.

mr.g
Автор

We can also do it by executing the following :

now.strftime("%Y-%m-%d %H:%M:%S")

and so

anishganguli