1. Список говнокодов пользователя vickers

    Всего: 6

  2. Python / Говнокод #13834

    −103

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    def removeSosedei(lst):
        lst_new = []
        for idx, item in enumerate(lst):
            if idx == len(lst) - 1:
                continue
            if lst[idx] != lst[idx + 1]:
                lst_new.append(item)
         return lst_new

    vickers, 20 Сентября 2013

    Комментарии (16)
  3. Python / Говнокод #13833

    −103

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    #!/usr/bin/python
    
    lst = [1,2,2,3,4,4,5,6,5,6]
    lst_new = []
    
    for idx, item in enumerate(lst):
        if idx == len(lst) - 1:
            continue
        if lst[idx] != lst[idx + 1]:
            lst_new.append(item)
    
    print lst
    print lst_new

    vickers, 20 Сентября 2013

    Комментарии (0)
  4. Python / Говнокод #13832

    −103

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    #!/usr/bin/python
    
    lst = [1,2,2,3,4,4,5,6,5,6]
    lst_new = []
    
    for idx, item in enumerate(lst):
        if idx == len(lst) - 1:
            continue
        if lst[idx] == lst[idx + 1]:
                continue
        lst_new.append(item)
    
    print lst
    print lst_new

    vickers, 20 Сентября 2013

    Комментарии (0)
  5. Python / Говнокод #13831

    −102

    1. 1
    2. 2
    for idx, item in enumerate(lst):
        print str(idx) + ": " + str(item)

    vickers, 20 Сентября 2013

    Комментарии (0)
  6. Python / Говнокод #13829

    −101

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    #!/usr/bin/python
    
    lst = [1,2,2,3,4,4,5,6,5,6]
    lst_new = []
    
    for idx, item in enumerate(lst):
        if idx == len(lst) - 1:
            continue
        if lst[idx] == lst[idx + 1]:
                continue
        lst_new.append(item)
    
    print lst
    print lst_new

    vickers, 20 Сентября 2013

    Комментарии (0)
  7. Python / Говнокод #13828

    −111

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    #!/usr/bin/python
    
    lst = [1,2,2,3,4,4,5,6,5,6]
    lst_new = []
    
    for (counter, i) in enumerate(lst):
        if counter != len(lst) - 1:
            if lst[counter] == lst[counter+1]:
                continue
        if counter != 0:
            if lst[counter] == lst[counter-1]:
                continue
        lst_new.append(i)
    
    print lst
    print lst_new

    vickers, 20 Сентября 2013

    Комментарии (4)