Re: [Tutor] Set values from list as per user input

2014-05-21 Thread Alan Gauld
On 21/05/14 13:39, Shweta Kaushik wrote: Hi All, I am new to python. Please help me. I have to create one function which can set values sent by user from a list of values. For eg: I have a list having values between 1 to 100. List = ['1', '2', ... '100'] I have to write a function to set valu

Re: [Tutor] Set values from list as per user input

2014-05-21 Thread Dave Angel
Shweta Kaushik Wrote in message: > Hi All, > > I am new to python. Please help me. > I have to create one function which can set values sent by user from a list > of values. > > For eg: > I have a list having values between 1 to 100. > List = ['1', '2', ... '100'] > > I have to write a functi

Re: [Tutor] Set values from list as per user input

2014-05-21 Thread R. Alan Monroe
> take value 15 from list Hint: use square brackets to choose a particular item from a list. test = ['first', 'second', 'third'] test[0] would refer to 'first' for example. Alan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscri

Re: [Tutor] Set values from list as per user input

2014-05-21 Thread Shweta Kaushik
Hi All, I am new to python. Please help me. I have to create one function which can set values sent by user from a list of values. For eg: I have a list having values between 1 to 100. List = ['1', '2', ... '100'] I have to write a function to set values from the list based on user input. If u