Re: [Tutor] Python - help with something most essential

2017-06-11 Thread Peter Otten
Japhy Bartlett wrote: > I'm not sure that they cared about how you used file.readlines(), I think > the memory comment was a hint about instantiating Counter()s Then they would have been clueless ;) Both Schtvveer's original script and his subsequent "Verschlimmbesserung" -- beautiful german wo

Re: [Tutor] string reversal using [::-1]

2017-06-11 Thread Peter Otten
Vikas YADAV wrote: > Question: Why does "123"[::-1] result in "321"? > > > > MY thinking is [::-1] is same as [0:3:-1], that the empty places defaults > to start and end index of the string object. > > So, if we start from 0 index and decrement index by 1 till we reach 3, how > many index we