If the variable my_listis global, you cannot:
my_list
my_list = []
which simply create a new link in the local area.
Also, I found it disgusting to use a keyword global, so how can I clear a list using its methods?
global
del a[:]
or
a[:] = []
How to remove the following list items:
def emptyit(): del l[:]
Source: https://habr.com/ru/post/1762494/More articles:How to structure simple Android applications - javaCreating Satisfaction Lists for a Set of Constraints - prologHow to receive several channels at the same time - concurrencyКак я могу проверить флажки в соответствии со значением, используя jQuery? - jqueryHow to use QColumnView to display multiple columns of data - c ++ASP.NET MVC 3 JSON ModelBinders not working - jqueryRegEx для соответствия строковым маркерам в любом порядке? - sqlSystem information in the browser - javaIterate over all fields in PDF using JavaScript - javascript.bat If the statement is batch-fileAll Articles