Google Colab - gui dropdown setting

Viewed 519

I want to create a dropdown in Google Colab and fill it with values from a given variable..

I understand how I can type the options of dropdown, but I don't know how to make the options applied from a list. For example:

#@title String fields

text = 'value' #@param {type:"string"}
dropdown = '1st option' #@param ["1st option", "2nd option", "3rd option"]

I am trying to display those '1st options', '2nd options', from a given list.

I would expect something like this to work, but it does not:

my_list = ['1st', 'second', 'third']
target = "1st" #@param my_list
0 Answers
Related