This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kumarmakala
Recipients kumarmakala
Date 2021-02-07.02:16:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612664174.69.0.83130833391.issue43150@roundup.psfhosted.org>
In-reply-to
Content
# Last empty string not removed from the list


str_list = ["Emma", "Jon", "", "Kelly","Eric", "", "","KXN",""]
for item in str_list:
    if len(item) == 0:
        str_list.remove(item)
print(len(str_list[-1]))

#Output
['Emma', 'Jon', 'Kelly', 'Eric', 'KXN', '']
History
Date User Action Args
2021-02-07 02:16:14kumarmakalasetrecipients: + kumarmakala
2021-02-07 02:16:14kumarmakalasetmessageid: <1612664174.69.0.83130833391.issue43150@roundup.psfhosted.org>
2021-02-07 02:16:14kumarmakalalinkissue43150 messages
2021-02-07 02:16:14kumarmakalacreate