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

  • Home
  • SEARCH
  • 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 9074553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:39:47+00:00 2026-06-16T18:39:47+00:00

Possible Duplicate: How to search nested list grid and give lettered coordinates in Python?

  • 0

Possible Duplicate:
How to search nested list grid and give lettered coordinates in Python?

I currently have this nested list acting as a 6×6 grid:

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

The rows and columns are referred to as A,B,C,D,E,F rather than the usual 0,1,2,3,4,5. Therefore the letters need to be converted to numbers and then the item has to be found in the nested list.

For example if the user typed in: FE CC ED ED CD
This should locate the letters for HELLO and print out the word HELLO as this was the encrypted message.

Any help on how I manage this would be greatly appreciated.

  • 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-16T18:39:50+00:00Added an answer on June 16, 2026 at 6:39 pm
    >>> input_string = "FE CC ED ED CD"
    
    # Convert input string into integers
    # `ord()` converts 'A' to 65, 'B' to 66, etc
    >>> pairs = [tuple(ord(letter) - ord('A') for letter in pair) for pair in input_string.split()]
    [(5, 4), (2, 2), (4, 3), (4, 3), (2, 3)]
    
    # Now just retrieve the tuples from the list of pairs
    # And look up the index in the grid
    >>> output = ''.join(grid[x][y] for x, y in pairs)
    'HELLO'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: php scandir --> search for files/directories I have a folder, inside this
Possible Duplicate: List Index Search I have to get index in an int[] where
Possible Duplicate: Search and replace inside an associative array I think this may have
Possible Duplicate: Bind textbox to 'enter' key I have a search text box. I
Possible Duplicate: Search for string in txt file Python How, in python, can I
Possible Duplicate: Search and replace a line in a file in Python How do
Possible Duplicate: Conditional Linq Queries Using Entity Framework 4.0 I have a search condition
Possible Duplicate: How can I get a specific parameter from location.search? I have a
Possible Duplicate: Search bar widget in android? I have to implement a Search Bar
Possible Duplicate: PHP MySQL Search And Order By Relevancy Hi, I have a table

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.