You are first adding R0Cx and then R1Cxy. You need to add RxCy. So try:

newlist = []
row = A
col = B
for x in range (0, row): 
  newlist.append([])

  for y in range(0, col):
    newlist[x].append('R' + str(x) + 'C' + str(y))

print(newlist)
Answer from Sefe on Stack Overflow
๐ŸŒ
Profound Academy
profound.academy โ€บ python-introduction โ€บ multi-line-lists-BLTEtz0sDYdm0zAjIB7S
multi-line lists โ€ข Introduction to Python
November 2, 2024 - Both of these list declarations are valid. Itโ€™s not mandatory to have all elements on the same line. As long as there is an opening and closing brackets [], everything in between separated by commas is considered part of the list.
Discussions

pyodbc - how to insert multiple rows from list with Python - Stack Overflow
I am trying to figure out how to insert multiple rows into python but I get an error: TypeError: ('Params must be in a list, tuple, or Row', 'HY000') for folderName in os.listdir(parentDirectory... More on stackoverflow.com
๐ŸŒ stackoverflow.com
September 30, 2019
Python: write multiple lists to multiple rows in csv - Stack Overflow
Connect and share knowledge within a single location that is structured and easy to search. Learn more about Teams ... At the moment, I know how to write a list to one row in csv, but when there're multiple rows, they are still written in one row. More on stackoverflow.com
๐ŸŒ stackoverflow.com
python - Assign multiple values from a list, by oder ,for multiple rows in dataframe - Stack Overflow
To be simple , I have a list abc , with abc=[a,b,c,d,e]. I want to assign these values for column 'Text'in the dataframe DF that have value in column 'Number' = 2. I know that the dataframe have 5... More on stackoverflow.com
๐ŸŒ stackoverflow.com
August 14, 2019
Look up a list of different values and return all rows in dataset that has one of these values in a given column?
You can use isin(). df[df['Number'].isin(my_list)] More on reddit.com
๐ŸŒ r/learnpython
6
1
October 22, 2023
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 26669376 โ€บ how-to-create-multiple-rows-from-single-list-if-one-of-items-is-list-as-well
python - how to create multiple rows from single list if one of items is list as well - Stack Overflow
October 31, 2014 - rows = [] row = [1, 2, [3, 4, 5]] temp_row = None for i, v in enumerate(row): if isinstance(v, list): print i, v for j in v: temp_row = row[:] temp_row[i] = j print temp_row rows.append(temp_row) print rows ... Should I review a paper that was reviewed and accepted by me for the second time in another journal? Difference between a model of computation and semantics ยท How to handle long-term time-dilation enabled missions ยท Production line soldering of solder cup connectors and wire ยท How long does it take to run memtester on a server with 3 TB RAM?
๐ŸŒ
SwCarpentry
swcarpentry.github.io โ€บ python-novice-inflammation โ€บ 04-lists.html
Programming with Python: Storing Multiple Values in Lists
June 29, 2026 - This is because Python stores a list in memory, and then can use multiple names to refer to the same list.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-rows-with-all-list-elements
Python - Rows with all List elements - GeeksforGeeks
July 23, 2025 - In this, we iterate for each row from Matrix, and check for the presence of each list element, if the present row is returned as a result. If any element is not present, row is flagged off. ... # Python3 code to demonstrate working of # Rows with all List elements # Using loop # initializing list test_list = [[7, 6, 3, 2], [5, 6], [2, 1, 8], [6, 1, 2]] # printing original list print("The original list is : " + str(test_list)) # initializing list sub_list = [1, 2] res = [] for row in test_list: flag = True # checking for all elements in list for ele in sub_list: if ele not in row: flag = False if flag: res.append(row) # printing result print("Rows with list elements : " + str(res))
๐ŸŒ
Snakify
snakify.org โ€บ two-dimensional lists (arrays)
Two-dimensional lists (arrays) - Learn Python 3 - Snakify
In this case each element is created independently from the others. The list [0] * m is n times consructed as the new one, and no copying of references occurs. Say, a program takes on input two-dimensional array in the form of n rows, each of which contains m numbers separated by spaces.
Find elsewhere
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ look up a list of different values and return all rows in dataset that has one of these values in a given column?
r/learnpython on Reddit: Look up a list of different values and return all rows in dataset that has one of these values in a given column?
October 22, 2023 -

I have a big data set, and I want to extract all rows that has certain values in one of the columns

Let's say I have 1000 rows, with 3 columns:

| Customer | Product | Number |

And I have a separate list of numbers (will match numbers found in column 3):

406597

504305

340405

305522

203400

Can I use python go through this separate list and return all rows from the dataset that matches either one of these numbers?

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ how can i print different items of a list in multiple lines?
r/learnpython on Reddit: how can I print different items of a list in multiple lines?
March 19, 2021 -

I am trying to create a chart in python using lists. I have a nested list (I think)

list = [[1, 2, 3], [4, 5, 6], [7,8,9]]

what I am trying to do is have each list in a different line so I want the output to be

1, 2, 3

4, 5, 6

7, 8, 9

so they are all in different lines and I have now created a 3x3 grid and i can access each number using its index which i think for example if I wanted to access the 5 on the middle of my chart I would do

[1][1]

row 2, position 2

(I used [1] because row 1 would be [0] and row 3 [2] (I believe))

the problem I have is that it prints it all in one single line so I am not able to create a 2d chart.

how would I create the chart using this method (or any other method sugested by you) and how would i acces each position and change its value (so for example if i wanted to access the position where the 5 currently is and turn it to a 7 so i would get

1, 2, 3

4, 7, 6

7, 8, 9

thanks.

๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ multi-dimensional-lists-in-python
Multi-dimensional Lists in Python - GeeksforGeeks
October 30, 2025 - In Python, a Multi-dimensional List is a list containing other lists, often used to represent structured data like matrices, tables or 2D arrays. Itโ€™s useful for storing and accessing data in rows and columns, commonly applied in data analysis, ...
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 61987311 โ€บ looping-over-a-nested-list-with-multiple-rows-and-columns
python - looping over a nested list with multiple rows and columns - Stack Overflow
Instead of replacing the data, the elegant approach in Python is to create new data, using comprehensions: def with_nones_replaced(grid, replacement): return [ [ replacement if value is None else value for value in row ] for row in grid ] ... Sign up to request clarification or add additional context in comments. ... I have forgot to mention that I want to replace the data in the same list ...
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ python-rows-with-all-list-elements
Python โ€“ Rows with all List elements
my_list = [[8, 6, 3, 2], [1, 6], [2, 1,7], [8, 1, 2]] print("The list is :") print(my_list) sub_list = [1, 2] result = [] for row in my_list: flag = True for element in sub_list: if element not in row: flag = False if flag: result.append(row) print("The resultant list is :") print(result) The list is : [[8, 6, 3, 2], [1, 6], [2, 1, 7], [8, 1, 2]] The resultant list is : [[2, 1, 7], [8, 1, 2]] A list of list is defined and is displayed on the console. Another list with integer values is defined.
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 43658289 โ€บ store-a-number-of-list-together-in-rows-so-i-can-call-every-row-and-make-manipul
python - store a number of list together in rows so i can call every row and make manipulations - Stack Overflow
That is not valid python. ... i know , this is just part of my code, i just need to ask how can i store multiple rows together so that i can perform airthmetic operations to my rows ... from random import randint points = [] for i in range(8): points.append([randint(0, 10) for i in range(3)]) # now possible to access point i by points[i] print(points) ... Find the answer to your question by asking. Ask question ... See similar questions with these tags.
๐ŸŒ
Medium
ianh6ll6n.medium.com โ€บ expanding-a-pandas-list-column-to-rows-41c69aaf9488
Expanding a pandas list column to rows | by Ian Hellen | Medium
March 19, 2021 - If the input data has rows with different numbers of list elements, we end up with Python None objects all over the place. We need to get rid of these but pandas doesnโ€™t have any clever way of dropping them efficiently (as it can with NaN values). The pandas replace function can sort this out for us.