On Sat, Oct 1, 2016 at 7:19 PM, Alan Gauld via Tutor wrote:
> On 01/10/16 23:08, boB Stepp wrote:
>> On Sat, Oct 1, 2016 at 11:35 AM, Alan Gauld via Tutor
>> wrote:
>>
>>> ... Personally I don't like functions that
>>> sometimes return one and sometimes two results. I'd rather
>>> you returned a
On 01/10/16 23:08, boB Stepp wrote:
> On Sat, Oct 1, 2016 at 11:35 AM, Alan Gauld via Tutor
> wrote:
>
>> ... Personally I don't like functions that
>> sometimes return one and sometimes two results. I'd rather
>> you returned a None first argument in the first case
>> to make it consistent.
>
On Sat, Oct 1, 2016 at 11:35 AM, Alan Gauld via Tutor wrote:
> ... Personally I don't like functions that
> sometimes return one and sometimes two results. I'd rather
> you returned a None first argument in the first case
> to make it consistent.
Why don't you like doing this? What are the plus
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
--
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/
On 01/10/16 09:16, anish singh wrote:
> I am trying to implement grep to just increase my knowledge
> about regular expression.
>
> Below is the program usage:
> python test.py -i Documents/linux/linux/ -s '\w+_readalarm*'
>
> However, due to my lack of knowledge about string handling
> in python
On 01/10/16 16:12, boB Stepp wrote:
>>> This module will take a string and right justify it so that the last
>>> character
>>> of the line will fall in column 70 of the display. The results will be
>>> printed to stdout.'''
>>>
>> Do you need print_msgs()?
>> Won't it work the same with
>>
>>
I am trying to implement grep to just increase my knowledge
about regular expression.
Below is the program usage:
python test.py -i Documents/linux/linux/ -s '\w+_readalarm*'
However, due to my lack of knowledge about string handling
in python, I am getting wrong results.
def read_file(file, pat
On Sat, Oct 1, 2016 at 8:12 AM, boB Stepp wrote:
> On Sat, Oct 1, 2016 at 2:02 AM, Alan Gauld via Tutor
> wrote:
> > On 01/10/16 05:24, boB Stepp wrote:
> >
> >>
> ===
> >> '''Exerise 3.1 from "Think Python 2" by Allen
On Sat, Oct 1, 2016 at 2:02 AM, Alan Gauld via Tutor wrote:
> Do you need print_msgs()?
> Won't it work the same with
>
>print(right_justify(input_string))
>
> You are only feeding one line at a time into the print msgs.
>
> You could do it all in a new print_msgs() like:
>
> def prin
On Sat, Oct 1, 2016 at 2:02 AM, Alan Gauld via Tutor wrote:
> On 01/10/16 05:24, boB Stepp wrote:
>
>> ===
>> '''Exerise 3.1 from "Think Python 2" by Allen Downey.
>>
>> This module will take a string and right justify it
On 01/10/16 05:24, boB Stepp wrote:
> ===
> '''Exerise 3.1 from "Think Python 2" by Allen Downey.
>
> This module will take a string and right justify it so that the last character
> of the line will fall in column 70 of
11 matches
Mail list logo