O

oct(integer)

 

Modul: Built-in

Syntax: oct(integer)

Beskrivning: Returnerar den oktala representationen av heltalet. Se Python-dokumentationen för mer information.

Exempel:

>>> oct(8)

'0o10'

>>> oct(64)

'0o100'

y N

 

or

 

Nyckelord

Syntax: x or y

Beskrivning: Kan returnera True eller False. Returnerar x om x evaluerar till True och annars y. Klistras in med mellanslag före och efter or. Redigera efter behov.

Exempel:

>>>2<5 or 5<10

True

>>>2<5 or 15<10

True

>>>12<5 or 15<10

False

>>> 3 or {}

3

>>> [] or {2}

{2}

y : Ops 9:or

[Fns…] > Ops 9:or

 

y N

 

[a A #]

 

ord("character")

 

Modul: Built-in

Syntax: ord("character")

Beskrivning: Returnerar tecknets unicode-värde. Se Python-dokumentationen för mer information.

Exempel:

>>> ord("#")

35

>>> ord("/")

47

y N