integer's methods

Lutz Horn lutz.horn at posteo.de
Thu Aug 18 09:11:26 EDT 2016


> CPython's lexical analyzer can't handle a dot after an integer literal
> so you must add a space in between "123" and ".".

Ok, this works:

 >>> 123 .bit_length()
7

But it looks really strange. Let's use a variable instead of an integer 
literal.

Lutz



More information about the Python-list mailing list