import random
def generate_tambola_ticket():
tambola_ticket = [[0] * 9 for _ in range(3)]
# Populate the ticket with random numbers in each column
for i in range(9):
col_range = list(range(i * 10 + 1, (i + 1) * 10))
random.shuffle(col_range)
# Distribute numbers across the three rows in the column
tambola_ticket[0][i] = col_range[0]
tambola_ticket[1][i] = col_range[1]
tambola_ticket[2][i] = col_range[2]
return tambola_ticket
def display_tambola_ticket(ticket):
for row in ticket:
print("|".join(map(lambda x: str(x).rjust(2), row)))
print("-" * 29)
def main():
num_tickets = 6 # You can change the number of tickets as per your requirement
for _ in range(num_tickets):
ticket = generate_tambola_ticket()
print("\nTambola Ticket:")
display_tambola_ticket(ticket)
if __name__ == "__main__":
main()