Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8738701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:47:03+00:00 2026-06-13T10:47:03+00:00

Suppose i have a matrix like this table = [ # grid: 4 by

  • 0

Suppose i have a matrix like this

table =  [
# grid: 4 by 9
['A','B','C','D'],
['E','F','G','H'],
['I','J','K','L'],
['M','N','O','P'],
['Q','R','S','T'],
['U','V','W','X'],
['Y','Z','1','2'],
['3','4','5','5'],
['7','8','9','0'],
]

If i want to print the the string thats two down on the third column(2x,3y) resulting in G. Or something along the lines. How do i tell python that it should be a grid? And how do i return list information, the table.find(something) did not work (saying table has no find attribute) Im fairly new to python. I have searched the internet, with not much help..

edit: I must be doing something wrong?

table =  [
# grid: 4 by 9
# 1   2   3   4  
['A','B','C','D'],#1
['E','F','G','H'],#2
['I','J','K','L'],#3
['M','N','O','P'],#4
['Q','R','S','T'],#5
['U','V','W','X'],#6
['Y','Z','1','2'],#7
['3','4','5','5'],#8
['7','8','9','0'],#9
]
print table[1][2], table[4][3]

Prints O and T.
O is right, but T is not, thats row 5 isnt it?’

I’m trying to write a text positional encryption algorithm with text matrixes, like one of the famous ciphers( i cant remember the name of).

I want to apply the said printing of each letter to the text that is caught by raw_input, i used dictionaries before, but i want to try this row/column method if possible, it will be much harder to break.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:47:04+00:00Added an answer on June 13, 2026 at 10:47 am

    List indexing starts at zero, so for example a fourth element in a list has index 3. You can define a helper function to get items/columns by their “actual position”.

    def column(matrix, i):
        return [row[i-1] for row in matrix]
    column(table,2)
    
    Out[15]:
    ['B', 'F', 'J', 'N', 'R', 'V', 'Z', '4', '8']
    
    def getitem(matrix,row,column):
        return matrix[row-1][column-1]
    getitem(table,2,3)
    
    Out[16]:
    'G'
    

    As for your edit, table[1][2] should print G, not O and table[4][3] rightly returns T.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose that I have a 2D array (matrix) in Java like this... int[][] MyMat
I want to build a square matrix. Let's suppose We have this matrix called
HI, suppose i have given input numbers like this 1,2,3,4,5,6,7,8,9,0 i should form it
Suppose I have an n*n matrix of distances between n users. I'd like to
This bothers me a bit: Suppose you have a matrix with three layers. Is
Suppose I have a simple multidimensional structure, like this one: somestr<-array(sample.int(2, 120, replace=TRUE), dim=c(4,5,6))
Suppose I have a large matrix: M <- matrix(rnorm(1e7),nrow=20) Further suppose that each column
Suppose you have a matrix of N*M of floats, I want to have a
Suppose I have the following matrix in python: [[1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16]] I want
Suppose I have a matrix of weights, and another matrix of data values. Can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.