Re: [Tutor] Desktop Notifications on Linux

2017-06-29 Thread Cameron Simpson
On 10Apr2014 17:04, Dharmit Shah wrote: On Thu, Apr 10, 2014 at 2:30 PM, Peter Otten <__pete...@web.de> wrote: Dharmit Shah wrote: I am trying to create a script that will go through the /var/log/secure file on a Linux system and provide desktop notifications for failed login attempts. [...]

Re: [Tutor] Query regarding output

2017-06-29 Thread shubham goyal
Thanks all Great place to learn Python. On Jun 29, 2017 7:24 PM, "shubham goyal" wrote: Thankyou all. Great place to learn. On Jun 29, 2017 5:55 PM, "Mats Wichmann" wrote: > On 06/29/2017 03:02 AM, Alan Gauld via Tutor wrote: > > On 29/06/17 03:14, shubham goyal wrote: > > > >> This Question

Re: [Tutor] Query regarding output

2017-06-29 Thread Mats Wichmann
On 06/29/2017 03:02 AM, Alan Gauld via Tutor wrote: > On 29/06/17 03:14, shubham goyal wrote: > >> This Question is asked in some exam. i am not able to figure it out. >> >> a = [0, 1, 2, 3] >> for a[-1] in a: >> print(a[-1]) >> >> its giving output 0 1 2 2 >> >> it should be 3 3 3 3 as a[-1]

Re: [Tutor] Query regarding output

2017-06-29 Thread anupama srinivas murthy
for a[x] in a: print(a) Except for when x = 0, a[x] never takes on its original value throughout the iterations So for x = 0, we get: [0, 1, 2, 3] [1, 1, 2, 3] [2, 1, 2, 3] [3, 1, 2, 3] For x = 1: [0, 0, 2, 3] [0, 0, 2, 3] [0, 2, 2, 3] [0, 3, 2, 3] For x = 2: [0, 1, 0, 3] [0, 1, 1, 3] [0, 1

Re: [Tutor] Query regarding output

2017-06-29 Thread Peter Otten
Alan Gauld via Tutor wrote: > On 29/06/17 03:14, shubham goyal wrote: > >> This Question is asked in some exam. i am not able to figure it out. >> >> a = [0, 1, 2, 3] >> for a[-1] in a: >> print(a[-1]) >> >> its giving output 0 1 2 2 >> >> it should be 3 3 3 3 as a[-1] belongs to 3. >> can

Re: [Tutor] Query regarding output

2017-06-29 Thread Alan Gauld via Tutor
On 29/06/17 03:14, shubham goyal wrote: > This Question is asked in some exam. i am not able to figure it out. > > a = [0, 1, 2, 3] > for a[-1] in a: > print(a[-1]) > > its giving output 0 1 2 2 > > it should be 3 3 3 3 as a[-1] belongs to 3. > can anyone help me figuring it out. This is q

[Tutor] Query regarding output

2017-06-29 Thread shubham goyal
Hello all, This Question is asked in some exam. i am not able to figure it out. a = [0, 1, 2, 3] for a[-1] in a: print(a[-1]) its giving output 0 1 2 2 it should be 3 3 3 3 as a[-1] belongs to 3. can anyone help me figuring it out. Thanks ___ Tut