get variable name in python 😀

preview_player
Показать описание
Code in Python to get a string with the name of some variable.

Support this channel, become a member:

🔥 Udemy Courses LOW COST Coupons/ Cupões Cursos Udemy BAIXO CUSTO 🔥:

With Udemy Courses you get/ Com Cursos da Udemy você terá:
♾️ Full lifetime access/ Acesso Vitalício Completo
📱📺 Access on mobile and TV/ Acesso no celular e TV
🏆 Certificate of completion/ Certificado de Conclusão

𝗗𝗼𝗻'𝘁 𝗳𝗼𝗿𝗴𝗲𝘁 𝘁𝗼 𝘀𝘂𝗯𝘀𝗰𝗿𝗶𝗯𝗲 𝗮𝗻𝗱 𝘀𝗺𝗮𝘀𝗵 𝘁𝗵𝗲 𝗯𝗲𝗹𝗹 𝗯𝘂𝘁𝘁𝗼𝗻!
Download source code at:

📚 Useful books from Mike Driscoll 📚:

Other videos:

Playlists:

Follow us on Facebook
Рекомендации по теме
Комментарии
Автор

This is intended for BEGINNERS! 😀

⭐ Every Monday, Thursday and Saturday we post a new question poll at the community tab of this channel! ⭐

⚡ Thanks for watching and don't forget to activate the bell 🔔 button so you get notified when a new video comes out! ⚡

AllTechPage
Автор

I used your video to white this

variables = dict(globals())
types = ('str', 'int', 'float')

for name in variables:
if (name[:2] != '__' and
print(name.ljust(20), '=', variables[name] if != 'float' else round(variables[name], 2))

Then you have a list of your variables and values

Thanks for your video :)

andresaldana
welcome to shbcf.ru