Jul 05 22:33:57 * kushal has changed the topic to: Welcome to Linux User's Group of Durgapur | Mailing list at http://lists.dgplug.org/listinfo.cgi/users-dgplug.org | Old classes http://www.dgplug.org/irclogs/ | 7:30pm - More on tags - Kushal | 10:30pm Python introduction Kushal | <--CLASS STARTED--> Jul 05 22:34:01 kushal:-> because then i would take off as you know i am on a dial up Jul 05 22:34:03 rangeen, but same basic things Jul 05 22:34:12 rangeen, you can tonight :) Jul 05 22:34:13 kushal, is the roll call over? Jul 05 22:34:17 Roll call Jul 05 22:34:23 * Debashree has quit (Read error: 104 (Connection reset by peer)) Jul 05 22:34:23 kishan goyal Jul 05 22:34:28 Ria Das Jul 05 22:34:29 * munichlinux (n=prashant@59.92.123.163) has joined #dgplug Jul 05 22:34:32 Ratnadeep Debnath Jul 05 22:34:34 Prakhar Agarwal Jul 05 22:34:37 Pushkal Srivastava Jul 05 22:34:42 amrita mukherjee Jul 05 22:34:43 Khushbu Mohta Jul 05 22:34:49 kushal:-> thanks.i have read your book it's good. Jul 05 22:34:59 rangeen, :) Jul 05 22:35:00 rangeen basu roy chowdhury Jul 05 22:35:02 aritra bose Jul 05 22:35:06 * pushkal wants that book too !! Jul 05 22:35:51 all done ? Jul 05 22:36:31 kushal: yes, I guess Jul 05 22:36:34 ok Jul 05 22:36:42 * Debashree (n=Debashre@61.2.165.226) has joined #dgplug Jul 05 22:36:51 * suse_nj (n=chatzill@59.178.182.18) has joined #dgplug Jul 05 22:36:58 So, from tonight we are going to learn a new programming language called python Jul 05 22:37:16 How many of you already know Python ? Jul 05 22:37:17 * techno_freak (n=parthan@unaffiliated/teknofreak) has joined #dgplug Jul 05 22:37:39 techno_freak, tonight we have couple of GUESTS here it seems :) Jul 05 22:37:45 I know it, but relatively new. Jul 05 22:37:50 ok Jul 05 22:37:54 anyone else ? Jul 05 22:38:09 kushal, guests? Jul 05 22:38:18 techno_freak, look at the nicks :p Jul 05 22:38:33 * kushal gives channel operator status to indradg Jul 05 22:38:36 :p Jul 05 22:38:38 * kushal gives channel operator status to tuxmaniac Jul 05 22:38:41 * kushal gives channel operator status to techno_freak Jul 05 22:38:52 * kushal gives channel operator status to Soumya Jul 05 22:39:16 kushal, please if you could introduce some of those guests :) Jul 05 22:39:25 Prakhar, later Jul 05 22:39:33 ok Jul 05 22:39:58 * arpita (n=arpita@117.201.97.191) has joined #dgplug Jul 05 22:40:06 I am not going to talk about how this language is better or why you should use this Jul 05 22:40:28 * techno_freak is now known as HereBePython Jul 05 22:40:28 * susenj (n=student@59.178.182.18) has joined #dgplug Jul 05 22:40:34 kushal, roll call Jul 05 22:40:38 arpita kapoor Jul 05 22:40:52 Neeraj Kumar Jul 05 22:40:58 I hope you all remember, someone in the class told that you should decide which language/tool you are going to use Jul 05 22:41:09 * suse_nj (n=chatzill@59.178.182.18) has left #dgplug Jul 05 22:41:39 debashree banerjee Jul 05 22:41:51 satya komaragiri Jul 05 22:42:06 Linux users, goto terminal , run the Python interpreter with the command "python" Jul 05 22:42:26 Windows guys , open the python shell from the meny Jul 05 22:42:29 * menu Jul 05 22:43:26 Everyone opened ? Jul 05 22:43:31 yes/no Jul 05 22:43:33 yes Jul 05 22:43:34 ye Jul 05 22:43:35 yes Jul 05 22:43:36 yes Jul 05 22:43:40 yes Jul 05 22:43:41 done Jul 05 22:43:42 yes Jul 05 22:43:51 yup Jul 05 22:43:56 yes Jul 05 22:44:12 see, I told you to open the interpreter Jul 05 22:44:20 yes Jul 05 22:44:22 yes Jul 05 22:44:41 that means we are not going to compile the codes, we will write in the interpreter , Jul 05 22:45:06 in that way we can check every line of the code that time only Jul 05 22:45:29 You can see >>> that is the python shell prompt Jul 05 22:45:46 it means it is waiting for the command (code) to be entered Jul 05 22:46:21 Python is a dynamic language , so no need to define variables before, just use them whenever needed Jul 05 22:46:26 write Jul 05 22:46:27 a = 10 Jul 05 22:47:28 now after this again command prompt will come Jul 05 22:47:49 To see the value of a ,just type a Jul 05 22:47:56 what it is showing ? Jul 05 22:48:00 10 Jul 05 22:48:08 :) Jul 05 22:48:15 yes, 10 Jul 05 22:48:15 pushkal, :) Jul 05 22:48:18 ok Jul 05 22:48:21 10 Jul 05 22:48:30 yes, 10 Jul 05 22:48:47 so, we never declared what is 'a', Jul 05 22:48:56 now type , a = 2.0 Jul 05 22:49:15 see the value of a Jul 05 22:49:23 2.0 Jul 05 22:49:25 2.0 Jul 05 22:49:28 2.0 Jul 05 22:49:35 2.0 Jul 05 22:49:36 * ria_ (n=ria@121.245.51.114) has joined #dgplug Jul 05 22:49:40 ok Jul 05 22:49:45 no need to type here :p Jul 05 22:50:08 To see the type of a variable, use type(variable) Jul 05 22:50:21 so tell me what is the current type of a ? Jul 05 22:50:33 float Jul 05 22:50:33 float Jul 05 22:50:36 float Jul 05 22:50:49 float Jul 05 22:50:51 float Jul 05 22:50:51 float Jul 05 22:50:53 ok, make a = 10 Jul 05 22:50:57 and check then ? Jul 05 22:51:06 int Jul 05 22:51:08 int Jul 05 22:51:15 ok Jul 05 22:51:18 int Jul 05 22:51:19 'int' Jul 05 22:51:24 int Jul 05 22:51:29 int Jul 05 22:51:40 so you can see dynamically the type of the variable is changing Jul 05 22:51:44 int Jul 05 22:51:59 Let us write the first Full program , which is Hello World Jul 05 22:52:06 print "Hello World!" Jul 05 22:52:37 Working ? yes/no Jul 05 22:52:40 yes Jul 05 22:52:44 yes Jul 05 22:52:48 yes Jul 05 22:52:48 ya Jul 05 22:52:51 yes Jul 05 22:52:56 yup Jul 05 22:53:00 yes Jul 05 22:53:03 * ria_ has quit (Client Quit) Jul 05 22:53:18 * sharanr (n=sharan@117.98.99.162) has joined #dgplug Jul 05 22:53:22 See how easy to write helloworld code Jul 05 22:53:25 yes Jul 05 22:53:57 Now we are going to write the same program in a file and execute it Jul 05 22:54:05 Fire up vi Jul 05 22:54:52 first create a new directory to write all python codes Jul 05 22:54:59 and start vi there Jul 05 22:55:00 what should be the ext. of the file, .py? Jul 05 22:55:16 don't create all files in the same folder Jul 05 22:55:25 rtnpro, I never told about anyfile Jul 05 22:55:31 * ria__ (n=ria@121.245.51.114) has joined #dgplug Jul 05 22:55:32 rtnpro, just asked to open vi Jul 05 22:55:34 ok Jul 05 22:55:51 ! Jul 05 22:55:55 Kishan, yes Jul 05 22:55:58 didnt get you Jul 05 22:56:17 ! Jul 05 22:56:31 Kishan, I told to write different codes in different folders, people do write all thing in the home folder only Jul 05 22:56:38 only to keep things clean Jul 05 22:56:42 arpita, yes Jul 05 22:57:13 All write http://rafb.net/p/wGpQsK69.html in vi Jul 05 22:57:13 to open vi editor command in python is?? Jul 05 22:57:33 arpita, where do you opened vi still now / Jul 05 22:57:33 ? Jul 05 22:57:54 * munichlinux is now known as munichpython Jul 05 22:58:11 so here also vi is the comm? Jul 05 22:58:50 arpita, yes, you already learned vi Jul 05 23:00:09 kushal, here vi is giving syntax error Jul 05 23:00:19 ! Jul 05 23:00:40 arpita, yes, because you are supposed to use vi in shell, not in python interpreter Jul 05 23:00:44 ! Jul 05 23:00:46 Kishan, yes Jul 05 23:00:57 same with me...im in windows... Jul 05 23:01:04 invalid syntax Jul 05 23:01:08 ! Jul 05 23:01:10 Kishan, not for windows guys Jul 05 23:01:13 rtnpro, yes Jul 05 23:01:36 kushal, I opened vi and wrote the code...how do i assign a filename to it and save it from within vi Jul 05 23:01:49 rtnpro, I taught that long back Jul 05 23:02:09 I can do that by vi Jul 05 23:02:13 anyone help rtnpro ^^ Jul 05 23:02:14 rtnpro, no Jul 05 23:02:26 * pushkal urges people to read logs ! Jul 05 23:02:33 rtnpro, you asked the right question Jul 05 23:02:39 but how to do that from within vi Jul 05 23:02:41 rtnpro, now wait for someone to reply Jul 05 23:03:00 rtnpro, yes, either read the log or wait for someone to answer Jul 05 23:03:02 anyone ? Jul 05 23:03:04 :save Jul 05 23:03:04 :w Jul 05 23:03:18 whats the significance of #!/usr/bin/env python Jul 05 23:03:28 rtnpro, never told yet Jul 05 23:03:34 khushi_, yes please Jul 05 23:03:37 how to exit from python interpreter Jul 05 23:04:11 khushi_, not told yet Jul 05 23:04:16 Ctrl + D Jul 05 23:04:23 Ctrl + d Jul 05 23:05:53 after saving that file, first give it executable permission , then run it like ./helloworld.py (helloworld.py is the file name) Jul 05 23:06:04 Windows guys, copy the code into a Notepad Jul 05 23:06:27 and name it .py Jul 05 23:06:55 if you have installed python, you should see the file icon like a python icon Jul 05 23:07:25 yes..got that Jul 05 23:07:35 * munichpython is now known as munichlinux Jul 05 23:08:18 Kishan, just type the filename from cmd to run it Jul 05 23:08:50 For everyone running ? Jul 05 23:09:03 yes Jul 05 23:09:11 yes Jul 05 23:09:18 kushal, it says bash: ./hello.py: Permission denied Jul 05 23:09:31 rtnpro, #!/usr/bin/env python this called shebang read this http://en.wikipedia.org/wiki/Shebang_(Unix) Jul 05 23:09:52 rtnpro, do this chmod +x hello.py Jul 05 23:09:53 ! Jul 05 23:10:17 munichlinux, please don't tell them these easy steps, they are supposed to know them from other classes Jul 05 23:10:21 Kishan, yes please Jul 05 23:10:32 command prompt or python's prompt??...not running in both Jul 05 23:10:39 rtnpro, and you are *NOT* using ! or Jul 05 23:10:41 * rsa_md5 (n=droopy@117.194.1.225) has joined #dgplug Jul 05 23:10:55 * ria has quit (Read error: 110 (Connection timed out)) Jul 05 23:10:56 kushal, oops sorry Jul 05 23:10:58 Kishan, command prompt Jul 05 23:11:04 munichlinux, no problem :_ Jul 05 23:11:05 kushal, sorry Jul 05 23:11:06 :) Jul 05 23:11:12 not running Jul 05 23:11:25 Kishan, just delete the first line Jul 05 23:11:36 its running Jul 05 23:11:37 Kishan, that is from linux guys Jul 05 23:11:46 munichlinux, what was the significance of chmod +x hello.py Jul 05 23:11:47 ok Jul 05 23:12:04 rtnpro, you go and read rishi's classes Jul 05 23:12:04 rtnpro, man chmod Jul 05 23:12:08 rtnpro, then come back Jul 05 23:12:17 ok Jul 05 23:12:25 rtnpro, read man page # man chmod Jul 05 23:12:26 rtnpro, it clearly indicates you are not at following Jul 05 23:12:28 showing syntax error while running Jul 05 23:12:36 kushal, after doing chmod +x p1,py its running Jul 05 23:12:38 arpita, what error? Jul 05 23:12:39 arpita, paste the error Jul 05 23:12:45 arpita, in rafb Jul 05 23:12:58 bose_aritra, I asked you to do that ^^ see my words Jul 05 23:13:47 arpita, ?? Jul 05 23:13:55 still not running...says windows can not find the file helloworld.py Jul 05 23:14:30 Kishan: open dos prompt Jul 05 23:14:48 Kishan, you are supposed to be in the same folder of the file Jul 05 23:14:53 Kishan: go to the directory where the file is by using "cd" Jul 05 23:14:59 Kishan, first go to that directory Jul 05 23:15:05 oh!...ok Jul 05 23:15:10 thanks Jul 05 23:15:14 arpita, are you there ? Jul 05 23:15:25 yes trying once again Jul 05 23:15:34 arpita, ok Jul 05 23:15:35 arpita, arrr, show us the error, plz Jul 05 23:15:41 munichlinux, got it...thanks Jul 05 23:15:52 rtnpro, cool Jul 05 23:15:53 arpita, let others too know what error you got and how to fix it Jul 05 23:16:24 kushal, got it...its working...thanks... Jul 05 23:16:37 Kishan, ok Jul 05 23:18:14 arpita, ! ? Jul 05 23:18:21 yes got it Jul 05 23:18:31 for everone else working ? yes/no Jul 05 23:18:46 yes Jul 05 23:18:55 yes Jul 05 23:19:23 only two ? Jul 05 23:19:31 yes Jul 05 23:19:34 kushal...me too Jul 05 23:19:38 yes .... Jul 05 23:20:12 ok Jul 05 23:20:18 moving on Jul 05 23:20:33 In python indentation is a very critical thing Jul 05 23:20:49 that means you have to be careful with white spaces Jul 05 23:20:51 try this Jul 05 23:21:08 a = 10 (look that blank space before a) Jul 05 23:21:30 what it is telling ? Jul 05 23:21:34 error Jul 05 23:21:40 indentation error Jul 05 23:21:45 File "", line 1 Jul 05 23:21:46 a = 10 Jul 05 23:21:46 ^ Jul 05 23:21:46 IndentationError: unexpected indent Jul 05 23:21:46 >>> Jul 05 23:21:57 same Jul 05 23:22:01 mavu, don't flood the room Jul 05 23:22:03 same Jul 05 23:22:03 ^^^^^^ same Jul 05 23:22:03 ok Jul 05 23:22:10 sorry Jul 05 23:22:17 we will see indentation properly later on Jul 05 23:22:17 yes, same error Jul 05 23:22:37 in python to write comments , we use # Jul 05 23:22:43 #this is a comment Jul 05 23:22:52 # this is also a comment Jul 05 23:23:10 Tell me how you write comments in C ? Jul 05 23:23:40 /* */ Jul 05 23:23:49 /* Jul 05 23:23:51 correct :) Jul 05 23:24:06 bose_aritra, wrong, you have to finish it Jul 05 23:24:07 /* */ Jul 05 23:24:08 /* Jul 05 23:24:20 am doing that only Jul 05 23:24:32 just a bit slow Jul 05 23:24:37 bose_aritra, where you did that , show us ? Jul 05 23:24:47 typo Jul 05 23:24:48 "// one line comment" Jul 05 23:24:48 oops Jul 05 23:24:57 /* */ Jul 05 23:25:09 susenj, I don't think that is allowed in C, in C++ yes Jul 05 23:25:15 tuxmaniac, ^^ am I correct ? Jul 05 23:25:33 but ...it works, i have seen Jul 05 23:25:39 Jul 05 23:25:50 susenj, try now in hello.c and tell us Jul 05 23:25:50 depends on the compiler Jul 05 23:25:56 / is C++ style i guess... its perhaps because its the same compiler that both work .. @ susenj Jul 05 23:26:06 // Jul 05 23:27:20 * rangeen has quit ("Ah La La and Tata") Jul 05 23:27:36 * rsa_md5 has quit ("Leaving") Jul 05 23:27:45 http://rafb.net/p/KwpOGU55.html is what I a getting Jul 05 23:27:51 anyway moving on Jul 05 23:27:55 kushal: allowed Jul 05 23:28:10 tuxmaniac, for any standard ? Jul 05 23:28:24 tuxmaniac, I know at least not in ansi Jul 05 23:28:28 kushal: but just not standard. For standards it is always better to use /* and */ Jul 05 23:28:38 tuxmaniac, ok Jul 05 23:28:54 anyway Jul 05 23:29:10 you already saw how to define variables Jul 05 23:29:14 You can do like Jul 05 23:29:19 a =10 Jul 05 23:29:22 b = 90 Jul 05 23:29:26 c = a + b Jul 05 23:29:28 print c Jul 05 23:29:43 * susenj_ (n=chatzill@59.178.160.245) has joined #dgplug Jul 05 23:30:26 you can assign more than one variable in a single statement Jul 05 23:30:45 a, b = 90, 23 Jul 05 23:31:16 ^^ by using this style it is very easy to do swapping of two variables Jul 05 23:31:22 a, b = b, a Jul 05 23:31:58 try above and tell me what are the values of a,b Jul 05 23:32:12 a=23,b=90 Jul 05 23:32:31 ^^^^same Jul 05 23:32:37 same Jul 05 23:32:40 same Jul 05 23:32:45 ok, that mens values got swapped Jul 05 23:32:58 same Jul 05 23:33:01 I hope you remember how many lines you have to write in C Jul 05 23:33:21 :) Jul 05 23:33:52 yes Jul 05 23:34:12 Now , write one code to convert the given temperature to Celsius from Fahrenheit Jul 05 23:34:47 given temp is 75.0 degree Fahrenheit Jul 05 23:34:50 fast Jul 05 23:35:04 and show us the rafb link Jul 05 23:36:59 http://rafb.net/p/4fJdcr89.html Jul 05 23:37:51 http://rafb.net/p/Qz3iKw96.html Jul 05 23:38:53 http://rafb.net/p/4Ej74z40.html Jul 05 23:39:12 pushkal, give me in float result :) Jul 05 23:39:21 mavu, ^^ Jul 05 23:39:22 ok kushal ! :) Jul 05 23:39:33 arpita, ^^ Jul 05 23:39:38 http://rafb.net/p/wAqPYc36.html Jul 05 23:40:08 http://rafb.net/p/q5ppZ558.html , kushal ! Jul 05 23:40:09 Kishan, ^^ see above Jul 05 23:40:23 http://rafb.net/p/ljRm0S87.html Jul 05 23:40:37 ok Jul 05 23:40:37 kushal, http://rafb.net/p/XEl3y135.html Jul 05 23:40:44 got it Jul 05 23:41:25 ok all Jul 05 23:41:37 http://rafb.net/p/OqQAtr54.html Jul 05 23:41:50 sorry...late Jul 05 23:41:52 http://rafb.net/p/aumaZy21.html Jul 05 23:41:54 in float Jul 05 23:42:18 ok Jul 05 23:42:22 moving on Jul 05 23:42:38 You can use all arithmetic operators Jul 05 23:42:47 also the relational operators Jul 05 23:43:02 like < , > , >= <= ... Jul 05 23:43:27 / is used to get floor division result Jul 05 23:43:31 // is used to get floor division result Jul 05 23:43:37 try Jul 05 23:43:48 10.0 // 3 Jul 05 23:43:52 10.0 / 3 Jul 05 23:44:24 ! Jul 05 23:44:25 working Jul 05 23:44:40 working Jul 05 23:44:50 works Jul 05 23:44:50 yes Jul 05 23:44:55 for first case its 3, for second its 3.33333333335 Jul 05 23:44:57 '/' isnt giving the floor result Jul 05 23:45:09 pushkal, see the next line, that was a typo Jul 05 23:45:18 got it kushal ! Jul 05 23:45:49 There is something about True value and False value in Python Jul 05 23:46:05 We have True and False as keywords Jul 05 23:46:44 * susen1 (n=student@59.178.160.245) has joined #dgplug Jul 05 23:47:01 anything other than 0, False and empty default data structure, is True Jul 05 23:47:10 ^^ above stated things are False Jul 05 23:47:20 we will talk later on data structure Jul 05 23:47:41 You can use short hand operators like += , *= Jul 05 23:48:15 We don't have character type ehere Jul 05 23:48:25 here Jul 05 23:48:27 * susenj_ (n=chatzill@59.178.160.245) has left #dgplug Jul 05 23:48:34 We have String type Jul 05 23:48:50 to define a string use double or single quotes Jul 05 23:48:53 like Jul 05 23:49:00 "kushal" , 'shjakhds' Jul 05 23:49:14 "I don't" Jul 05 23:49:25 'Here is double quote ""' Jul 05 23:49:48 * susenj has quit (Read error: 110 (Connection timed out)) Jul 05 23:50:18 everyone ok ? Jul 05 23:50:23 hmm Jul 05 23:50:29 yes Jul 05 23:50:45 yup Jul 05 23:50:45 others ? Jul 05 23:50:47 yep Jul 05 23:51:13 yup Jul 05 23:51:16 yes Jul 05 23:51:20 ok Jul 05 23:51:40 ok Jul 05 23:52:02 yees Jul 05 23:52:07 yes Jul 05 23:52:28 ok Jul 05 23:52:43 Now I am going to talk about some basic string features Jul 05 23:52:51 ask questions when I say STOP Jul 05 23:53:42 You can create strings of multiple lines using triple double quotes or triple single quotes Jul 05 23:54:11 To add(concatenation) of strings we use + Jul 05 23:54:32 strings are indexed Jul 05 23:54:36 like in array in C Jul 05 23:54:40 so you can do like Jul 05 23:54:43 s = "abcd" Jul 05 23:54:46 s[0] Jul 05 23:54:48 * youngling is now known as pradeepto Jul 05 23:54:55 which will print a Jul 05 23:55:40 to print 0 to 3rd position of the string Jul 05 23:55:44 s[0:4] Jul 05 23:55:58 ^^ which can written as s[:4] Jul 05 23:56:18 so you can write even this s[2:4] Jul 05 23:56:35 index can be negetive Jul 05 23:56:39 * Debashree has quit (Read error: 104 (Connection reset by peer)) Jul 05 23:56:46 which will be counted from the right side Jul 05 23:56:52 so s[-1] will give d Jul 05 23:57:33 to see the size of a string use len function Jul 05 23:57:36 len(s) Jul 05 23:57:40 will give you 4 Jul 05 23:58:23 Jul 05 23:58:30 ask questions if any Jul 05 23:58:32 ! Jul 05 23:59:02 ! Jul 05 23:59:16 cant we do s[-1:-4] Jul 05 23:59:18 ? Jul 05 23:59:35 Kishan, try ans see yourself Jul 05 23:59:39 rtnpro, yes Jul 05 23:59:41 result gives ' ' Jul 05 23:59:45 always Jul 06 00:00:09 whats the significance of 4 in [0:4] and [2:4] Jul 06 00:00:12 * Debashree (n=Debashre@61.2.164.106) has joined #dgplug Jul 06 00:00:46 rtnpro, upto 4 -1 th position Jul 06 00:00:59 ok Jul 06 00:01:04 rtnpro, so it will print like s[0], s[1], s[2], s[3] Jul 06 00:01:16 ok thanks Jul 06 00:01:19 The actual syntax for slicing is Jul 06 00:02:38 anyone else ? Jul 06 00:02:43 ! Jul 06 00:02:45 ! Jul 06 00:02:53 pushkal, yes Jul 06 00:02:59 s[-1:-4] Jul 06 00:03:16 ^^ to explain this Jul 06 00:03:23 yes Jul 06 00:03:25 the actual syntax is Jul 06 00:03:31 s[from , to , offset] Jul 06 00:03:39 by default offset is 1 Jul 06 00:03:48 oh Jul 06 00:03:52 which becomes a false in ^^ case Jul 06 00:03:58 so, to see from right side Jul 06 00:04:02 you should write Jul 06 00:04:06 ! Jul 06 00:04:32 s[-1:-4:-1] Jul 06 00:04:38 arpita, yes please Jul 06 00:05:00 offset here means size of each slice?? Jul 06 00:05:37 arpita, offset means how much you want jump everytime (almost what you said ) Jul 06 00:05:46 all , try with a bigger string Jul 06 00:05:54 and offset like 2 or 3 Jul 06 00:06:43 s[-1:-4:-1] gives 'dcb'... where is the 'a' ? Jul 06 00:06:54 kushal, ! Jul 06 00:07:23 pushkal, if you start with d as -1 what is the value of a ? Jul 06 00:07:46 kushal, does it mean that the magnitude of the value in 'to' always gets reduced by 1 Jul 06 00:07:54 -4, kushal Jul 06 00:08:02 kushal, is it? Jul 06 00:08:20 kushal, thats why b is in -3 Jul 06 00:08:32 pushkal, yes, then try s[-1:-5:-1] Jul 06 00:08:50 that shows it, thanks ! Jul 06 00:08:53 rtnpro, yes not just reduced, but by the offset Jul 06 00:08:54 kushal, ! Jul 06 00:09:17 rtnpro, yes Jul 06 00:10:38 * pradeepto (n=pradeept@59.184.244.17) has left #dgplug ("Konversation terminated!") Jul 06 00:12:18 so , no questions ? Jul 06 00:12:32 * susenj (n=chatzill@59.178.160.245) has joined #dgplug Jul 06 00:12:35 * arpita_ (n=arpita@117.201.96.243) has joined #dgplug Jul 06 00:12:57 * susenj (n=chatzill@59.178.160.245) has left #dgplug Jul 06 00:13:39 ok, then I am stopping here Jul 06 00:13:48 <--CLASS OVER-->