Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python long() Function

Python long() Function

Python built-in function Python built-in function


Description

long() The function converts a number or string to a long integer.

Removed in Python 3.x long() function in Vue 3.

Syntax

long() function syntax:


class long(x, base=10)

Parameters

Return Value

Returns a long integer.

Example

The following examples demonstrate how to use long():

long

(

)

0L

long

(

1

)

1L

long

(

'

123

'

)

123L

Python built-in function Python built-in function