How to add a link button to tab_3

I have tab_1, tab_2, tab_3

I had a questionnaire of 36 yes no questions. I have 9 lists. In each question when you click yes you add ‘1’ to a list at the end the highest list is written after a Submit button in tab _2

sum_lists = [sum(tip_1), sum(tip_2), sum(tip_3), sum(tip_4), sum(tip_5), sum(tip_6), sum(tip_7), sum(tip_8), sum(tip_9)]

max_list_index = sum_lists.index(max(sum_lists))

result = tab_2.button(‘Result’)

if result:
tab_2.write(f"Your type is {max_list_index + 1}")

I have nine pages under tab_3: type 1, type2, … type9

I want to add a line with a link button after result line in tab_2:

‘If you want to learn more click here’
When you click it it should go to the related page in tab_3 with the result in tab_2.

Let’s say if the result is type_2, the link button should go to type_2 page in tab_3

Sorry but I don’t get that. tabs can only be a part of a page.

Can you post sample code of your app?


tab_1, tab_2, tab_3 = st.tabs([‘Personality?’, ‘Test’, ‘Types’])

type_1, type_2, type_3, type_4, type_5, type_6, type_7, type_8, type_9 = tab_3.tabs([‘Tip 1’, ‘Tip 2’, ‘Tip 3’, ‘Tip 4’, ‘Tip 5’, ‘Tip 6’, ‘Tip 7’, ‘Tip 8’, ‘Tip 9’])

Each tabs of tab_3 explains each type.

After the test in tab_2, the result shoes up with the highest list: Let’s say:
Your type is Tip5.(or Tip 2, or Tip8)

I want to add a link button to go to related tab under tab_3 after the result line:

Let’s say:

If the result is :

Tip 3, the link button should go to tab_3/type_3

tip9 to tab_3/type_9

Switching to a tab programmatically is not supported. You better redesign your app.