Tags: listas

Sort by: Date / Title /

  1. 9 years ago by macks
    tips
    1. string = '[1,2,3]'
    2. list = eval(string)
    3. print list
    4. [1, 2, 3]
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2063"></script>
  2. 9 years ago by macks
    1. cName = ['funciton','bcp','interbank','sheraton']
    2.     cPhone = ['65465465','4546545','56465465','545454545']
    3.     cRuc = [5465463545,546546546,5245454,9898998]
    4.  
    5.     store = [cName,cPhone,cRuc]
    6.    
    7.     l = []
    8.     i = 0
    9.     for s in store:
    10.         cname = store[0][i]
    11.         cphone = store[1][i]
    12.         cruc = store[2][i]
    13.         l.append({'cname': cname, 'phone':cphone, 'ruc':cruc})
    14.         i = i+1
    15.  
    16. savelog(l)
    17. [{
    18.   'phone': '65465465',
    19.   'cname': 'funciton',
    20.   'ruc': 5465463545L
    21. },
    22. {
    23.   'phone': '4546545',
    24.   'cname': 'bcp',
    25.   'ruc': 546546546
    26. },
    27. {
    28.   'phone': '56465465',
    29.   'cname': 'interbank',
    30.   'ruc': 5245454
    31. }]
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2035"></script>

First / Previous / Next / Last / Page 1 of 1 (2 posteets)