Decimal Literals and Operations (Theory of Python) (Python Tutorial)

preview_player
Показать описание
The first steps in Python are to identify decimal literals. Literals embed values in the program code itself. We also explore some basic integer operators and the abs() function. Your homework is to try these out in an interactive python session to understand how they work for yourself.

Thank you!
Рекомендации по теме
Комментарии
Автор

It is the only channel Python actually does behind the console. Great Series! BTW, do you wrote any book that sells on Amazon?

姜皓-wj
Автор

Great video. So, the "integers automatically expand to be whatever size they need to be" thing that Python 3 brought to computing is pretty cool, but those of us who are used to, well, pretty much dang near every other language are all gonna be wondering "do they expand bit by bit? Jump to the next integral number of bytes? What?" I found it weird when they are showing the bitwise operators in other videos, and for example two's complement and bitwise...guessing what sizes things will end up being. I did see that:
>>> i = -1
>>> i &
536870911
So I guess i expands with sign extension as necessary....kind of like int + long but to the nearest bit?
I will continue on and see what you say about that.

jvsnyc
Автор

Nice summary, though I admit I surfed in looking for the possibility of Decimal literals (i.e. not decimal literals, but Decimal typed numbers as supplied by the native decimal module). Quite distinct. But I think there are no literals for Decimals alas.

BerndWechner