Python: Say Goodbye to Hard-to-Read Numbers using this Trick!

preview_player
Показать описание
Hey, Python enthusiasts! Have you ever dealt with hard-to-read numbers in your code? Do you feel lost trying to read billions or millions of numbers? Well, I have great news for you - Python has a feature that allows you to use underscores to make those numbers more readable!

In this video, I'll show you how to use this feature in Python to improve the readability of your code and avoid errors when working with large numbers. I'll show you how to use underscores in variables and in different mathematical operations.

This feature is called "digit separators" and it was introduced in Python 3.6, it allows you to separate digits in a number with underscores to make them more readable, for example: 1_000_000 instead of 1000000.

Don't miss this opportunity to strengthen your Python skills and increase your productivity when writing code. Leave a comment if you have any questions or suggestions about this feature. See you in the next video.

You can watch more about Python from my course:
Рекомендации по теме
Комментарии
Автор

Mostly you will be using dynamic values from customer input and won’t really hard code these super long numeric values but still this is good knowledge 👍

HarsimranMarwah
Автор

The Waffle House Has Found Its New Host

stlmunchiez