Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: python 2D array creation and print issue
Post: RE: python 2D array creation and print issue

Suppose that two numbers are given: the number of rows of n and the number of columns m. You must create a list of size n×m, filled with, say, zeros. The obvious solution appears to be wrong: a = [[...
developerbrain General Coding Help 5 2,831 May-15-2019, 01:38 PM
    Thread: python 2D array creation and print issue
Post: RE: python 2D array creation and print issue

str1 = "snbdsbhaswertybvbx" str2 = "bhzbhcgsdwertyndvdddwsdws" str1len = len(str1) str2len = len(str2) arr = [[0]*str2len]*str1len for i in range(0,str1len): for j in range(0,str2len): ...
developerbrain General Coding Help 5 2,831 May-15-2019, 07:02 AM
    Thread: python 2D array creation and print issue
Post: RE: python 2D array creation and print issue

When printing the arr [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1] [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1] [0, 0, 0, 0, 0, 0, 0, 1, 0...
developerbrain General Coding Help 5 2,831 May-15-2019, 05:52 AM
    Thread: python 2D array creation and print issue
Post: python 2D array creation and print issue

str1 = "snbdsbhaswertybvbx" str2 = "bhzbhcgsdwertyndvdddwsdws" str1len = len(str1) str2len = len(str2) arr = [[0]*str2len]*str1len for i in range(0,str1len): for j in range(0,str2len): i...
developerbrain General Coding Help 5 2,831 May-15-2019, 05:47 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020