[issue45265] Bug in append() method in order to appending a temporary list to a empty list using for loop
New submission from Nima : I want to make an list consist on subsequences of another list, for example: -- input: array = [4, 1, 8, 2] output that i expect: [[4], [4,1], [4, 1, 8], [4, 1, 8, 2]] -- but output is: [[4, 1, 8, 2], [4, 1, 8, 2], [4, 1, 8, 2], [4, 1, 8, 2]] -- my code is: num = [4, 1, 8, 2] temp = [] sub = [] for item in num: temp.append(item) sub.append(temp) -- i think it's a bug because, append() must add an item to the end of the list, but here every time it add the temp to the sub it changes the previous item as well, so if it's not a bug please help me to write the correct code. -- components: Windows messages: 402458 nosy: nima_fl, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Bug in append() method in order to appending a temporary list to a empty list using for loop type: behavior ___ Python tracker <https://bugs.python.org/issue45265> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41228] Fix the typo in the description of calendar.monthcalendar(year, month)
Change by Nima Dini : -- assignee: docs@python components: Documentation nosy: docs@python, ndini priority: normal pull_requests: 20516 severity: normal status: open title: Fix the typo in the description of calendar.monthcalendar(year, month) type: enhancement versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue41228> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41228] Fix the typo in the description of calendar.monthcalendar(year, month)
New submission from Nima Dini : https://docs.python.org/3.10/library/calendar.html#calendar.monthcalendar > days outside of the month a represented by zeros. "a" needs to be changed to "are" -- ___ Python tracker <https://bugs.python.org/issue41228> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
