Created
March 14, 2014 09:14
-
-
Save gnurag/9544505 to your computer and use it in GitHub Desktop.
ujson lists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [anurag@dagobah ~]$ python | |
| Python 2.7.5 (default, Feb 19 2014, 13:47:28) | |
| [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2 | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> from blist import blist | |
| >>> from ujson import dumps | |
| >>> a=range(10) | |
| >>> a | |
| [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
| >>> b=blist(range(10)) | |
| >>> b | |
| blist([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) | |
| >>> | |
| >>> dumps(a) | |
| '[0,1,2,3,4,5,6,7,8,9]' | |
| >>> dumps(b) | |
| '{}' | |
| >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment