Re: python console menu level looping

2017-09-25 Thread ROGER GRAYDON CHRISTMAN
On Mon, Sep 24, 2017 09:41 PM, Daiyue Weng wrote: > Hi, I tried to make a menu using print statements in Python 3. The code is >as follows, > >print('insert data into: ') >data_insert_method = ['new collection', 'existing collection'] >for index, elem in enumerate(data_insert_method): >print(ind

Re: python console menu level looping

2017-09-24 Thread Cameron Simpson
On 24Sep2017 21:41, Daiyue Weng wrote: Hi, I tried to make a menu using print statements in Python 3. The code is as follows, One thing, please try to preserve the code indenting in messages. What you pasted is all hard against the left side of the screen. I've tried to repair it. print('

Re: python console menu level looping

2017-09-24 Thread Daiyue Weng
Sry for the unclear formatting, this is the original code with correct format (copy from pycharm), print('insert data into: ') data_insert_method = ['new collection', 'existing collection'] for index, elem in enumerate(data_insert_method): print(index, '-', elem) while 1: how_to_insert =

Re: python console menu level looping

2017-09-24 Thread Daiyue Weng
well, in my case, there is no GUI, and we do not intend to use it since this script is only for internal testing purposes. So I am just wondering how to loop menu in this context. On 24 September 2017 at 22:03, Stefan Ram wrote: > Daiyue Weng writes: > >I am wondering how to loop back to the 1s

python console menu level looping

2017-09-24 Thread Daiyue Weng
Hi, I tried to make a menu using print statements in Python 3. The code is as follows, print('insert data into: ') data_insert_method = ['new collection', 'existing collection'] for index, elem in enumerate(data_insert_method): print(index, '-', elem) while 1: how_to_insert = input('Choose a meth