-------- Пересылаемое сообщение --------
   08.09.2020, 01:43, "python-list-ow...@python.org"
   <python-list-ow...@python.org>:
    

   Hello! I see you want to post a message to the Python List. We would
   be happy to help, but you must subscribe first:

     [1]https://mail.python.org/mailman/listinfo/python-list

   After you have subscribed, please send your message to
   [2]python-list@python.org again. Please do not include images as this is
   a text-only forum -- instead, copy/paste or transcribe the information
   from the image that you want us to know.

   Alternatively, this list is mirrored both ways with the
   comp.lang.python newsgroup (news:comp.lang.python).

   Some people find it easier to follow this and other lists via gmane
   ([3]http://news.gmane.org/gmane.comp.python.general), a service which
   offers a newsgroup interface to many online mailing lists.

   *NB all posts to the mailing list are publicly archived at:*

     [4]https://mail.python.org/pipermail/python-list

    

    
   -------- Конец пересылаемого сообщения --------
    
    
   With Regards.
   Python is best.
    

References

   Visible links
   1. https://mail.python.org/mailman/listinfo/python-list
   2. mailto:python-list@python.org
   3. http://news.gmane.org/gmane.comp.python.general
   4. https://mail.python.org/pipermail/python-list
--- Begin Message ---
   Hello, python creators and bug fixers.
   I have same strange Basic-type problem time after time.
   Deleting elements of lists - is Basic of basics thing. And i can't count
   on it. It doesn't work in some cases.
   I found a simple example, and example of my problem - to modify the string
   data that i got from parsing internet, web-data - this is the case i got
   the problem.
    
   Simple Example 1.
   I expect to delete all/any elements by index from list by using del,
   .remove(), pop() - it must work as usually. But that doesn't happens.

     _list = list(range(50))
     for i, el in enumerate(_list):
         del _list[i]
     print(_list)

   result:

     # [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35,
     37, 39, 41, 43, 45, 47, 49]

   Same for pop(i) and remove(el).
    
   Works only filter(), creating new _list2 with .append(<filtered elements>)
   , with SAME IF-statements - as for delete.(thats for Example 2 and problem
   i met with)
    
   Example 2.
   I got a string from parsing something from internet. This is a body of one
   message from my Gmail this time.
   And there is no any way to delete empty elements in existing list to
   pretty the final output-data.
   Sometimes it deletes random elements, but not all. Sometimes deletes
   nothing.
   Another diagnose - tried to take len() of of each element, and it says 0
   to non zero elements.
   The only solution is to create a new list and append needed items instead
   of delete non-needed in first-list.
    
   There are many EMPTY elements. I do .split("'r\n") and trying to run a
   FOR-cycle.
   The list example:
   ['Вы вошли в аккаунт Google с нового Xiaomi HM Note 2', '', '', '', 'Для
   завершения настройки установите официальные приложения от Google.', '',
   '', 'Google Sheets', '', 'Google Sheets', '', 'Создавайте таблицы и
   работайте над ними вместе', '', '4.5/5 Stars', '', '', '', '', '',
   'СКАЧАТЬ', '', '', '', '', '', '', '', 'Google Calendar', '', 'Google
   Calendar', '', 'Все ваши календари, мероприятия и встречи в одном
   приложении', '', '', '', '', '', '', '', 'СКАЧАТЬ', '', '', '', '', '',
   '', '', 'Google Duo', '', 'Google Duo', '', 'Проводите видеовстречи с
   высоким качеством изображения', '', '4.5/5 Stars', '', '', '', '', '',
   'СКАЧАТЬ', '', '', '', '', '', '', '', 'Не отвечайте на это письмо. Вы
   получили это сообщение, так как недавно  ', 'активировали свой аккаунт
   Google на Xiaomi HM Note 2.', '', '', '', '© 2018 Google LLC 1600
   Amphitheatre Parkway, Mountain View, CA 94043, USA', '', '', '', '',
   '—————————————————————————————', '', '', '', '']
   With Regards.

--- End Message ---
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to