# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
# ---------------------------------------------------------------
# python best courses https://courses.tanpham.org/
# ---------------------------------------------------------------
# Write a Python program which takes two digits m (row) and n (column) as input and generates a two-dimensional array. 
# The element value in the i-th row and j-th column of the array should be i*j.
# Note :
# i = 0,1.., m-1 
# j = 0,1, n-1.

# Input
# Input number of rows: 3                                                                                       
# Input number of columns: 4  

# Output
# [[0, 0, 0, 0], [0, 1, 2, 3], [0, 2, 4, 6]]

row_num = int(input("Input number of rows: "))
col_num = int(input("Input number of columns: "))
multi_list = [[0 for col in range(col_num)] for row in range(row_num)]

for row in range(row_num):
    for col in range(col_num):
        multi_list[row][col]= row*col

print(multi_list)

# +
row_num=int(input("row: "))
col_num=int(input("col: "))
row_range=range(row_num)
col_range=range(col_num)
print(list(row_range))
print(col_range)
table=[[0 for col in col_range] for row in row_range]

for row in row_range:
    for col in col_range:
        table[row][col]=row*col
        
print(table)
# -

num_list = [1, 2, 3,4,5,6]
for num in num_list:
    print (num)
    num_list.remove(num)
print (num_list)



StarcoderdataJupyterScriptsDedupFiltered