| | |
newb: Print ids, you get 1L, what is L?
![]() |
•
•
Join Date: Jul 2006
Posts: 608
Reputation:
Solved Threads: 152
Apparently so. You can check it:
Jeff
Python Syntax (Toggle Plain Text)
>>> a = ((11L,), (12L,), (13L,), (14L,), (15L,), (16L,), (17L,), (18L,), (19L,), (20L,)) >>> print a[0] (11L,) >>> print a[0][0] 11 >>> print type(a[0][0]) <type 'long'> >>>
Jeff
•
•
Join Date: Sep 2007
Posts: 33
Reputation:
Solved Threads: 9
If you are returning longs you can selectively turn them into integers using int() e.g:
- Paddy.
Python Syntax (Toggle Plain Text)
>>> a = ((11L,), (12L,), (13L,), (14L,), (15L,), (166666666666L,)) >>> b = tuple((int(i[0]),) for i in a) >>> b ((11,), (12,), (13,), (14,), (15,), (166666666666L,)) >>>
![]() |
Similar Threads
- Forms in Random access files (Visual Basic 4 / 5 / 6)
- Trying a leet to human dictionary: Help! (Python)
- Need 2 print (Visual Basic 4 / 5 / 6)
- internet explorer while trying to print (Web Browsers)
- Adding data to print job (Visual Basic 4 / 5 / 6)
- Outlook XP won't print (Windows NT / 2000 / XP)
- Page counter print accounting (*nix Software)
Other Threads in the Python Forum
- Previous Thread: Generating HTML in Python
- Next Thread: Array Distances
Views: 2221 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for Python
application array beginner c++ c/c++ change character class client code command convert count create csv ctypes database dictionary django dll dynamic embedding error examples excel exe extensions fdlib file float format framework ftp function graphics gui homework image images import input itunes library line linux list lists logging loop loops microcontroller mouse mysql mysqldb number numbers output parse parsing path port prime processing program programming py2exe pygame pygtk pyqt python random raw_input recursion recursive redirect remote scrolledtext server socket ssh stdout string strings syntax table terminal text thread threading tkinter transparency tuple tutorial ubuntu unicode variable variables web windows wxpython





