Reputation: 25
I have the following error in my Python code:
File "number.py", line 4
print("Absolute value: "+str(abs(119L)))
^
SyntaxError: invalid syntax
What is the cause?
Upvotes: 2
Views: 11940
Reputation: 6888
In Python you don't need to worry with long integers. You only need to declare an integer and forget the memory allocation and if the integer will be short or long.
Upvotes: 0
Reputation: 15009
There is no need to indicate long types as one might with C-type languages. Python 3.0 integers are always as big as necessary, so just drop the L
.
Upvotes: 1