mardi 23 décembre 2014

Assign and print Long Variable in python

I am new to python.And one of my requirement is to deal with long values.The problem is i didnt know how to assign a long value.This question might be very silly.But im just now starting to learn the language.I have seen a blog and i tried something like this :



# Long program in Python
x=1
y = long(x)
print(type(y))


But i am getting an error like this:



Traceback (most recent call last):
File "main.py", line 4, in <module>
y = long(x)
NameError: name 'long' is not defined


Can anyone please help me in acheiving this?





Aucun commentaire:

Enregistrer un commentaire