Re: [Tutor] How to give input to a list

2011-10-02 Thread Bod Soutar
On 2 October 2011 04:20, surya kasturi sur...@live.com wrote: Hi, How give input to a list all at once. I mean if we declared a array and like to take input for it for (i=0;i5;i++)     scanf(%d,array[i]); here we can give input of 5 numbers with a space in command prompt. Similarly in

Re: [Tutor] How to give input to a list

2011-10-02 Thread Alan Gauld
On 02/10/11 04:20, surya kasturi wrote: for (i=0;i5;i++) scanf(%d,array[i]); here we can give input of 5 numbers with a space in command prompt. In Python we would normally read the entire string using raw_input() then split the string into its constituent parts like: inStr =

Re: [Tutor] How to refresh the interactive prompt?

2011-10-02 Thread Alan Gauld
On 02/10/11 06:17, Richard D. Moores wrote: refresh the prompt? By refresh I mean get a new interactive prompt with nothing imported and all things like a = qwerty, n = 123, etc. no longer in effect. Not sure what the wording should be for that. imports cancelled and variables deleted? If

Re: [Tutor] How to refresh the interactive prompt?

2011-10-02 Thread Steven D'Aprano
Richard D. Moores wrote: Python 3.2.2, Win 7 When using the Python 3 interactive prompt, is there a way to quickly refresh the prompt? By refresh I mean get a new interactive prompt with nothing imported and all things like a = qwerty, n = 123, etc. no longer in effect. Not sure what the

Re: [Tutor] How to give input to a list

2011-10-02 Thread Peter Otten
surya kasturi wrote: Hi, How give input to a list all at once. I mean if we declared a array and like to take input for it for (i=0;i5;i++) scanf(%d,array[i]); here we can give input of 5 numbers with a space in command prompt. Similarly in python if i create a list and do

Re: [Tutor] How to refresh the interactive prompt?

2011-10-02 Thread Richard D. Moores
On Sun, Oct 2, 2011 at 01:47, Steven D'Aprano st...@pearwood.info wrote: Richard D. Moores wrote: Python 3.2.2, Win 7 When using the Python 3 interactive prompt, is there a way to quickly refresh the prompt? By refresh I mean get a new interactive prompt with nothing imported and all things

[Tutor] String switch

2011-10-02 Thread Christopher King
Dear Tutors, I was wondering how one would make it so all the cases of all the strings in a python file where switched. I know that for individual strings, you can use .swapcase(), but I'm making a program to edit others, so it would be easier to just do something at the top that would switch

Re: [Tutor] String switch

2011-10-02 Thread bob gailer
On 10/2/2011 8:33 PM, Christopher King wrote: Dear Tutors, I was wondering how one would make it so all the cases of all the strings in a python file where switched. I know that for individual strings, you can use .swapcase(), but I'm making a program to edit others, so it would be easier