 So, today we will start with basic python. So, let us begin. So, the goal of today's session is to basically try and cover as much as I can of basic python. The idea is I will try to cover enough that you have time tomorrow to look at may be more advanced concepts that may not even be on the slides. The idea is I am trying to cover a significant amount of python. So, that you are able to learn the language enough to sustain yourselves by yourself by reading documentation that is available online. And now recap what we did last class. I covered the language and the basic interpreter. I stopped just before starting basic data types. I will redo these slides very rapidly. I will take less than 5 minutes to finish it and then get to the main meat of the matter which is the rest of the python material today. Broadly what we will cover is basic introduction to the language and the interpreter, the basic data types and operators in python. We look at strings, conditionals, loops, lists which are basic data structures, input and output, how to handle files, basic functions in the use of additional more advanced data structures like tuples, dictionaries and sets. So, we will try to finish as much as we can today and then take up the rest tomorrow. And once if we finish all of this material, we will go over to object oriented programming and look at may be the standard library and things like that. So, python is basically a very high level programming language. It is often considered a scripting language, but many people consider the term scripting language to be a denigratory term that is it is not only used for some elements of scripting, it is a full fledged programming language, it is not just a toy programming language. And many people have written fairly large applications using python itself. It is very readable and has a very readable syntax that you will soon see. It is very easy to learn, hopefully you will also understand that by the end of this, by today itself you will know the basic elements of the language. And thanks to the language being easy to read and learn, it does not get in your way when you are trying to solve problems which is very important. To top this, there are extensive libraries to do pretty much anything that you want to do with python. As a result, it makes you extremely productive, unlike say a much lower level language. High level language allows you to write things much more compactly and gives you access to a lot of additional features through libraries and frameworks and other software platforms. Python provides for all of these and therefore, it is important that you learn the language very carefully. It was created by Guido van Rosum, he is a Dutchman and he is considered the benevolent dictator for life, that is what BDFL stands for. Basically, he chaperones the direction of the language, makes sure that the design decisions, most design decisions for the core language will go through him. He has the ultimate authority with respect to deciding that, but there is a very large developer team that builds Python. Therefore, it is a growing developing language that has a huge user base. And the name of this programming language is not based on the snake, but based on 70s comedy that I described in the last class. So, again several features very readable, it is highly interactive and this is something that I will emphasize on as we go through the course. A lot of the material that I will cover will actually be on my interpreter session. The reason is I want you to also understand that using the interpreter is crucial. It is important that you do not think of Python as any other programming language, where you are forced to kind of use a language reference of some sort like a book or a Bible or something like that, that you have to keep shifting through. You have to learn to use the interactive interpreter often enough and be comfortable doing that in order to be able to program way more efficiently. As a personal anecdote, I have written a lot of Python code, but I often, I do not actually own a Python book. What I will often do is I will start up the Python interpreter and explore interactively before I write my code and it turns out that is much faster for you and you do not require any resources apart from your computer, which is you do not even need the internet very often, that is very, very convenient. It is memory managed in that reference counter, you do not have to worry about memory management per se, which is a big boon, has a huge standard library, which I discussed. It is object oriented and it does not force the object orientation on you, plus it interfaces very well to C, C++ and Fortran. So, if you want to take an existing code and you want to connect to it, you can do it and essentially it allows you to use your time a lot better. So, the first thing we look at is starting the interpreter. We did this last session. What you need to do is, I assume that all of you have Python started up, set up. So, what you do to start a Python session is to type Python and you will get this prompt that you see here, this thing you see here, this is the Python prompting you for input. So, basically the interpreter is waiting for your command and let us go with our first hello world program. This is going to be your first hello world program and we are done. We did this last class. So, I am going to speed this up. Just control D to exit. Now, this Python that I started is simply Python. This is the vanilla Python, basic Python interpreter. You do not have to use this. The reason is this Python interpreter is by itself, it is powerful. There is another interpreter called Ipython. So, just add an I in front of this and this Ipython is a lot more convenient to use. It provides a lot of convenience facilities, a lot of commands, extra commands and a whole host of features that we will start using on a regular basis. Therefore, we for this course will be using Ipython. Before we go to Ipython, a note on the version, there are two versions of Python commonly used. The greatest version I think is 3.2 and the version that we will be using is 2. Something. The reason is 3.x versions are not backward compatible and lot of libraries are not ported to that yet and we will rely on certain scientific computing libraries which have not been ported to 3. 2.7 works perfectly fine as this 2.6. So, kindly use a 2.x importer. I am not going to honor questions on why 3.x, 2.x that is a separate issue. If you have separate questions, we will ask, you can ask me at the end of today's session or something like that. So, do not get worried about it too much. Just know that we will be using Python 2.x for the course. And if you want a discussion, you can ask me questions later on during the day. Not right now. Let us get on with the language. Any core aspects of the language have not changed too much. Certain things that have changed, but we would not get to that. So, let us start with iPython. So, type out iPython on the session. This should start your iPython session and you will get this prompt that looks like this i n 1. It is a numbered prompt. It is kind of like the same Python prompt. I can type Python code here and it will immediately interpret and evaluate my to quit. Again, you press ctrl D enter or ctrl D. I accidentally ctrl D on my shell. So, it went for a toss. So, ctrl D will exit the iPython session. You can press n if you do not want to exit or hit return. It will exit. So, we have started our Python interpreter. We have exited. We will now start using more of the features of iPython. So, let us get back into iPython. I have cleared the screen. So, you can all see. Let us do some simple arithmetic. Nice thing is I often find myself using iPython as a simple calculator. If I want to do some quick calculations, I can do it on the interpreter. Standard arithmetic operations, all of these operations work. Try these out on your interpreter. Now, notice that the output that you get on this session is printed with out of 4. Basically, if you put any input expression will be evaluated by Python and the result of that expression or if it is a function call, whatever be the result of that expression will be stored in this output and it will show you explicitly as out. Note however, if I did print 1 plus 2, it will not give me an out because print is essentially printing to the standard output. This is important. You need to understand the distinction between these two. When you print, it is just printing to screen. It is not storing. It is not storing that expression or anything of that kind. When I do 1 plus 2, it is an expression that the iPython interpreter is storing the result of that expression and that is why it is saying out. Think of it like a return statement. If I have a function that returns a value, that value is returned that somebody has to accept that variable. So when I call a function or have an expression, this will evaluate to something. That something is stored in out. If you do not store it into a variable. On the other hand, when you print, it is basically printing it out to screen. That is all. Now, let us do a little more exploration of iPython. If I hit the up arrow, the up arrow key, down arrow key, I can cycle through all the lines of code that I have typed and this by the way will go to previous sessions of all kinds of things that somebody else whoever has used this computer has typed, has used this login session. So the nice thing is you can access your history and be lazy. So I can go up and say, okay, I want to print 5 star 10. So you can do things like that and use the history. And this is a convenience that iPython provides. The other very powerful feature is tab completion. So if I want to look at RO and I want to find the function that is available, you press RO tab and it will complete the name for you. So this happens to be a function and if supposing there are ambiguous completions. So if I do R tab, it will tell me there is raise, range, row input. All of these are possible. So if I want to say, no, I only want round, I do RO and tab. It looks like RO, the only completion possible with RO is round. So it completes that. So the idea is you can use tab to complete your commands. It is very, very useful and we will keep using it regularly. The final thing that we will use a lot is the help feature. So if I do A, B, S question mark or let us go back to round. Round I do RO tab. Now I am pressing question mark and I press return. When I press return it gives me the output that it returns is help documentation about this function round. So it is basically saying, look at this. It is saying this is the dock string which says round a number given an optional number of digits and returns a floating point number. This is what that means. This line means round is a function that takes a number with an optional end digits. Something specified within these square brackets inside this dock string by convention is assumed to be an optional argument and this returns a floating point number. So it basically rounds a number to a given position blah, blah, blah. Now one thing you may run into is when you do this question mark it may put you, supposing it is more than one page, you have five pages of documentation for something. What will happen is it will open what is called a pager and it will say more. You press space, it will go to the next page, up arrow, down arrow. You can navigate your documentation but how do you get out? You press Q. So press Q. So let us use our round code 2.482. It is going to give me 2.482 but it also takes an optional argument the number of digits. So let me make that 2 and now it becomes 2.482. So use tab completion and the question mark to obtain help. Let us look at abs, abs tab again will tell you abs takes a number and returns another number basically is looking at the absolute value of the argument. The final thing before we get into the language is sometimes you will get stuck when you mistype something. So let us say we do round of 2.4 comma and you accidentally hit enter as you are typing around. You finish this close the bracket hit enter it will work. But if you do not want it you are stuck here you press control C and it will exit. So use either complete of the command complete the function invocation that you by closing the bracket or supplying any additional arguments or you hit control C. So basically you should be comfortable with the ipython session. I will give you one minute for you to review starting ipython make sure that all of you can start ipython. If you do not if you cannot start ipython you are not able to run ipython. This rest of the day is going to be useless for you. So you have not installed it I am not going to wait for you the whole day but you really have to make sure you have ipython running. If you do not you are going to miss out on a lot of fun. So please make sure you can start ipython type your first program print hello world then do R tab RO tab call round with 2.34 do round RO tab question mark. Please make sure you can do all of this. I will give you exactly one minute. So I assume since no one has any chat messages that you are all done you are comfortable with doing this finally exit the ipython interpreter by pressing control D and you should be out. So someone is saying round 56.29702 and it gives me 59.2999999999 what is happening? Well that is an exercise I want you to think about it we will come back to it in a little while. It is a good question. So given this basic introduction to your ipython interpreter we will now begin in earnest on the language itself. I will come back to your question about rounding why that does not work think about it in the meantime. Basically just understand that numbers when represented on the in python or floating point numbers. So the basic data types that python has that are built in there are plenty of data structures that are available but the basic data types that you will use probably the most often are the following. There are numbers integers floating point numbers complex numbers they are built in. There is a Boolean number Boolean data type. There is sequences like strings lists and tuples. These are what we will call the basic data types. There are slightly more advanced data types that are part of the built in language they are not something you have to get separately and we will look at these basic data types first and then get on to the other more advanced ones later. So we will start with integers. Let us create a first little variable. I clear the screen so you are able to see a is equal to 13. What I have done now is I have assigned this variable called a to the value 13. 13 is an integer. So if I say type of a it will tell me this type is int. Notice that integers can be arbitrarily long. So I can say the only thing you have to note here is when I look at a it says 999999L. So underneath in python the way you have to think about it that integers can be arbitrarily long but underneath there are actually two things happening. There is a basic integer which has a finite length and there is a long integer which can be arbitrarily long. It does not matter however long it can be. So when you see an L here do not get scared. When you see an L here in the end here notice that there is an L here it means it is a long but it is still essentially an integer. You can treat it just like an integer and you do not have to worry about it. So as far as you are concerned integers in python can be arbitrarily long. Floating point numbers are again straight forward. So let us create a floating point number 3.1415 let us say if I want to print the value of p I can say print p or if I type p notice that it gives me the full floating point representation of this number. Now in different versions of python the print function, the print expression, the print keyword does different things. I think my version of python is 2.6. In 2.7 it will round it up to 3.1415. However notice that these are floating point numbers and they conform to the IEEE 854 standard of double precision numbers. As a result many numbers cannot be exactly represented. If you know that there are many floating point numbers would not be exact because you would need to represent it with a finite sized mantissa and therefore it is not going to always be exactly what you think. There will be some small difference. So if you remember the previous case we looked at 56.23. Notice that it is actually internally represented as 56.22999999999 and finally ending in 7 because this is the only possible representation that it is able to store in binary with the floating point representation. So it is actually an issue of floating point representation with a fixed amount of precision. They are all 64 bits of precision. Therefore, you have to keep this in mind and sometimes the python interpreter will show you this, sometimes it may not but you have to know that underneath that floating point number is a fixed precision quantity. So do not worry about it too much. Your different python versions will show you slightly different things, underneath they are floating point numbers of 64 bits and the exact representation may not be what you have in mind. There will be some slight difference. Please keep that in mind. But basically creation of a floating point number is straight forward. You just type it out. Notice that we do not have to explicitly say float P is equal to this. In fact, typing float P is equal to this is illegal. It is syntactically incorrect. Complex numbers again pretty straight forward. The general syntax is variable name is real part plus imaginary part and the imaginary part is denoted by this symbol j. So for example, if I say c is 3 plus 4.123j, c will be a complex number. So if I do type of c, it will give me complex. To find the real part, I can say c dot real, c dot image and notice that if I say abs of c, it is going to calculate the square root of the sum of the squares of the real and imaginary parts which is what you can do. The other thing you have to keep in mind is let me clear this. If I define j is equal to 1, j is just some simple convenience that is made for your convenience. If I say j is 1 and I say c is 1 plus 1 j, it still works. But if I say c is 1 star j, c will be 2. So if I say c is 1 star j, c is 1 star j, c is 1 star j. So you have to be a little careful when you write your expressions in complex. I would suggest that instead of using this 1 plus 1 j form, you actually use the full notation. So I can say, I can optionally do it as c is complex. This is the real part 1. This is the imaginary part 2. So then there is no ambiguity. You do not have to worry about oh is this j defined already. Usually if you use it carefully enough j will work. But if you are in doubt, you want to absolutely make sure you use 2 j, sorry the complex 1, 2. So some of you are asking me to go a little slow. I think these are all fairly basic notions and you will have plenty of opportunity to try an experiment. So I am not going to go too slow. If you have specific questions, please stop me. I will probably stop after basic data types. At that point you can ask me a bunch of questions. I will answer whatever questions you have. Until then I am just going to go ahead in order to finish this basic part. It is fairly elementary. There is nothing special. One note when you are if you are in doubt and you have some confusion, you have the interpreter. I may be wrong because I am not the interpreter. Your goal should always be that you should try whatever you have a doubt. You please try it on your own interpreter first. You will get some clarity. If you do not understand that, obviously you may have to ask someone. But otherwise try it out first and most of the time your question will be answered if you just try it out. And we will come back to questions. So operations or numbers behave pretty much as you expect. So if I say 23 plus 74, 23 minus 56, 45 into 76, all of these examples are pretty straight forward. One thing you have to be careful about is what happens if I do 8 by 3. What do you expect? You would expect it to do whatever 2.6666 but it will actually give you 2 because normally when you do a division between integers, it will return only an integer value. So if you want explicitly a floating point result, you must explicitly tell python to do this either by giving one of the numbers an 8 point or a 3 point or whatever or you can explicitly say float of 8 by 3. This is particularly useful and I have a variable. So if I say a is equal to 24 or 25 and I want a by 2, it will give me only 12. But if I want to do it as floating point, I can do this. So the one thing to watch out for is integer division. Be careful about this. The other operators that are very useful are the modulo percentage and power. So exponentiation is through double star. So if I want to say 2 star star 20 or if I say 2 point star star 0.5 that will give me the square root. So you can define any kind of exponentiation using the star star operator. Note that it is not the carrot. So 2 carrot 3 will be something else. It is a Boolean operation. Star star is exponentiation. Variables and assignment. All the operations that I have done so far could be done on variables as well. So I can say a is 23, b is 74, a star b. c is this, d is this, f is c by 3. So all of these are again standards straightforward motions. This is an assignment. c is equal to c by 3. So I am basically evaluating the current value of c, dividing it by 3. So if c is an integer, this will give me another integer. It is a floating point number. This will give me a floating point number and that result will be again stored back in c. This on the other hand can be written as c slash equals 3. So you can have in place operators as well, in place assignment operators as well. So this is essentially equivalent to this. c slash equals 3 is c is equal to c by 3. Again standard, this is all familiar from c. Not very different at all. So Booleans are again some things that you will see very often in Python. In all your conditionals, what you are actually using is Booleans. So what you need to understand for a Boolean is there are two symbols defined in Python. One is called true, the other is false and the case matters. It is capital TRUE. If I type small true, it is going to give me a name error saying name true is not defined. Please note it is also important as you go along error messages are important. Python will always almost always give you an error message. You should be comfortable reading error messages because if you are not comfortable reading error messages, you will not be able to decipher, debug any problems related to your program. So when I did true, it says true is not defined. However, if I did true, capital T, it is a name that is already built. These are the Boolean type. Similarly, false is the false Boolean. So if I say T is true, T will evaluate to true. F is not T. Notice that you use N O T, the word not. Similarly, F R T, F and T, all of these define Boolean variables. You can do multiple operations in a single command. So you can say F and T or T. Please note, it does not make sense going through the operator presidents and all of that. Instead, use brackets whenever you want to make it explicitly clear which one you want evaluated first. Again straightforward. So we now have to go to the next major topic which is strings, lists and tuples. I will pause here for a second. If you have any questions right now on the content done so far, please ask them. I will continue with my next slide. But if I see any questions on the chat session, I will answer them immediately. If there are no questions, I will assume that this content is sufficiently basic and simple that you have no doubts. So the next major thing, basic data types are sequences. Sequences we broadly look at as we look at the three major types that you use. One is the string, second is the list, third is the tuple. Now each of these holds a bunch of elements in a sequence. And the elements can be accessed based on the position in that sequence. So these are all similar in the sense that they all can be indexed. They all have a notion of an order. Every element has an index which means I can access that through that index. And it is a sequence which means one follows the next in the order of specification. It is obvious to look at a string. A string is a sequence of characters in a particular order. So the order is important. The other important thing I want you to note at the end of these slides is there is a common pattern when you use sequences. And in Python this is used very often. When you access sequences, the kind of code that you will write will be the same regardless of whether it is a string, list or a tuple. So look for these common patterns as you see the slides. So how do you create a string, each of these strings, lists and tuples? These slides are initially very basic on strings, lists and tuples because this is just an introduction to strings, lists and tuples. If you look at the table of contents, we will have separate sections dedicated to each of these data types. So we will expand on this but now what we look at is the common elements. To create a string, you basically say variable name is equal to assignment operator and you can put the string inside quotes. This is hello. This is a string, greet string is now a string type with hello as the value of that. A list is always specified by square brackets and separate and elements inside are separated by commas. So this list contains 1, 2, 3, 4, 5, 6, 7, 8. A tuple instead of using brackets uses parenthesis. So let us just create this. I am lazy so I am not going to type the full name. Now if I look at type of A, it is a string, type of L, it is a list, L is a list and T is a tuple. So creation, there are differences. Strings, you create using this kind of a notation, quotation marks. We will get into the details of, there are a variety of ways by which you can define strings. You can use either double quote or single quote or something called a triple quote. All of those we will look at when we look at strings in detail. List are created like so and tuples are created like so and each of them has a distinct type. So you have to notice one thing. Even though I have not declared the type explicitly of A, A definitely has a well defined type called string. So python is what is called strongly typed but dynamically typed. There is a difference. What this means is when I assign a quantity to a variable, I do not have to explicitly statically define that type. But that quantity A has a very clear type and every object that you have in python has a clear type, has a certain type. So it is strongly typed, it is not weakly typed but it is dynamically typed. That is, it is not statically typed but dynamically typed. So this is how we create strings, lists and tuples, elementary creation. How can we operate on these? First thing is, how do I access the elements? So I can say A of 2, L of 2, T of 2. Notice that A was hello and A was hello. And L was 1, 2, 3. So which means L of 2 is giving me 3 which suggests that the index is based on 0 offset indices. So indices start at 0 and end at n minus 1 where n is the length of that sequence. You can add two sequences of the same type. So I can say A plus world. Excuse me, hello world. I can say L plus 4, 5. Notice here I accidentally put a backslash here. I went to the next line and corrected that. Notice that I typed a backslash. I just went to the next line and finished the bracket and it worked. So now notice that it created a new list of 1, 2, 3, 4 and 5. So I can add sequences of the same type. I can find out the length of a sequence by typing length of that sequence. So length of L, length of T, length of A. So now the obvious question many of you will have is what if I add a string to a number. This is not JavaScript. So you cannot say A plus 1. What does it say? It gives you an explicit error saying cannot concatenate string and int objects. It will not try to string if I int. You have to explicitly tell it saying I want you to format a string as such and then you can format it. But right now know that you cannot just arbitrarily add anything. So for example if I say A plus L I cannot do it. Neither can I do L plus 1. So I can only concatenate. So look at the error it is giving me. It is saying can only concatenate list not int to list. And please make these mistakes. Feel comfortable trying these out on your interpreter. Do all kinds of crazy things and learn to read the error messages as you get. Python is trying to tell you something. Suppose the commonality you can access quantities through the index. You can add quantities of the same type in case of sequences and you can get the length of the sequence using length. Now often if you have a sequence you want to check if something is inside that sequence. So for example if I want to say is the H character in A. Let me clear. Let us recall print A, T. This is what we have. Now if I say H in A it will tell me if the character H is there in A. Will this work for substrings? Yes. Please note that the output it gives me is a Boolean. It says true or false. And what should this give me? Predict what this will give me. False. Similarly I can check if 3 in L. 4 in L. False. What is L? L was 1, 2, 3. So the point is I can check for container ship inside an element using the in keyword. So 3 in num list, H in greet string, W in greet string, 2 in num tuple, so on and so forth. So one more obvious question people will have is, can I say 1, 2 in L? The answer is false because it is trying to check for the existence of a list with elements 1 and 2 inside L. You are not asking whether the elements 1, whether 1 is there and 2 is there. How do you express that? 1 in L and 2 in L. That is logically different from 1, 2 as an element in L. You can find maximum and minimum elements, maximum of num list. This is rather meaningless. I have never had the need to use the minimum of a string. So you could treat this as min num tuple for example. It will find the minimum element. The last two concepts are very important. I will spend a little bit of time explaining these. So let me clear your screen so you can see clearly. We have L and T. So let me now redefine num list just like the example to be, okay. Now let us look at num list 1. Num list 1. Num list 1, what do you expect? Now this funny syntax here says num list 1 colon 5. What this is doing is it is saying give me a slice of that list. So I can say 1 colon 5. What this will do is it will start, it will create a sub list. So let us see what it does and then I will explain to you what it is doing. It starts at 2. Remember num list 1 is 2 and gives me 2, 3, 4 and 5. What are the index values of each of these? 1, 2, 3 and 4. Am I clear? The index of 2 is 1, index of 3 is 2, 4 is 3, 5 is 4. But I specified 1 colon 5. Therefore understand that the slice syntax is saying start at the index number 1 and give me 5 minus 1. Do not include the last index, okay. Sometimes people ask why is this last index not included? The reason is can be looked at supposing I want to recreate the entire list. What will I do? I will want to say I process the first 4 elements and then I want to process the rest of the elements. Now I simply can do this, right. If I did this 2, 3, 4, 5, 6, 7, 8, 9 and remember it is now reconstructed the full list starting at the first index. So the reason you do not include the last index is it is easy to construct then you do not have to do a plus 1, minus 1, nothing, okay. So by default when I do, so let us look at num list again. If I do num list of 1 colon 5 it gives me 2, 3, 4 and 5 which means it gives me starting at index number 1 up to 5 but excluding 5. That is how you have to understand this slice syntax. The next thing is striding. So this syntax can be extended to add what is called striding information. Let us now try this 1 colon 5 colon 2. What does this give us? This will give us a 2 and 4. What this means is the last index, remember this is optional. I did not specify it in this column. Here I did not specify it but here I specified this. If I do specify it, it means it is a step size. Step by 2 indices, so start at 1 which is 2, step by 2 which means go to 4, step by 2 go to 6 but 6 is exceeded 5, index 5. So it will give me just 2 and 4, okay. I will repeat myself. When you give this syntax it basically says start at this index number 1, finish at 4 including 4, do not include 5, step by 2. So start and step. So you can think of it as start and non-inclusive. That would be the syntax for this. Notice also that comments in Python are given with the hash, the pound symbol and incidentally comments can be given in line. So is this clear? I have done this reasonably slowly. Let us go over the basic concepts. You create strings, lists and tuples using this syntax, single quote string or double quote string. Create lists using square brackets, elements separated by commas, tuples with parenthesis, again elements separated by commas. You access elements of the sequence using index notation with square brackets not parenthesis. Please remember parenthesis will give you an error. You have to use square brackets and the indices start from 0. We will get to more about indices, what kind of indices, what is valid, what is not subsequently. But know that indices start at 0. You can add sequences of the same type. You can find the length of any sequence using length, a built in length function. You can check container ship using the in keyword. So I can say 3 in num list, h in grid string so on and so forth. You can find the max and min in a sequence. You can slice a sequence using this syntax either 1, 5 and 1, 8, 2 will give me start and non-inclusive step. So these are the basic operations on sequences and notice that these are common. Then we will get to the actual details of strings in the next session. So I will now quickly answer some questions. Number one, please explain the difference between list and tuple. I am not going to explain the difference between list and tuple at this stage. We are going to do list, strings and tuples in greater detail later at which point the differences will become obvious to you. I do not want to get into it now because I will have to introduce various other notions at this stage. Just be patient. End of the I think by afternoon session you will understand the difference. Second question, how to print list in reverse order? Please wait is my answer. Third question, how to call a number by position? I am not, I do not understand what the question is. Can you explain what your question is? Somebody else is asking me num list minus 3 comma 9. Firstly you should get an error because num list minus 3 comma 9 is illegal syntax. I am happy you are trying all kinds of things but you are getting a type error. It is saying list indices must be integers not a tuple. So many of you are going way ahead. I am happy you are playing. I am very happy that you are playing around with your interpreter. Please wait. So be a little patient. I cannot finish all of python in 5 minutes and answer all possible questions. So if you are experimenting just learn to read the error messages and understand that there are things that are going to be different. Obviously I cannot finish lists in like that. It is not going to happen. So be a little patient. I will come back to explain. So somebody is asking me output for list minus 3 comma 9. I will not answer this question at this stage because I have not gotten into any details about sequences apart from the common features. So please hang in there. How can we search character? I am not Google. So please do not ask me questions. How can we search a character without checking case? No, this is not the time to ask me that question. I have not even come to searching for a character. Are you asking me h in container ship in sequence? If so please wait. Many of these questions can be answered when you go into the details. So I am not taking any more questions of this nature. If you have any questions on the content I have expressed so far, please ask me. 1 comma 5 comma 2, if 5 is exclude the 5, but if you write 1 comma 5 comma 3, where is comma 3 sorry 1 colon 5, colon 3 then include the 5. Sir colon sorry colon. Yeah yeah go ahead. So 1 colon 5, colon 3. So include the 5. No it does not. Please note that all of these indices are, all of these indices are they are indices not the values. 1 colon 5, let me just do not understand the indices. These are indices and again hang on we are not getting into any of the details here. Please wait we will come back to you later. So sorry about that the question was numb you are asking me all kinds of detailed questions and I have not come to any of the details. So let me finish and then we will ask question. I am asking you questions not about other things I am going to cover, things that I have covered so far if you have some basic questions fine. In fact maybe I should not ask any questions now. I should not ask you to ask me questions now. We will continue after this full session you have questions we will sit and answer all of those questions. As I go ahead we can ask some questions. These are general questions. What is the maximum size of an integer in Python? Answer please find out for yourself try to create the largest integer you can. I already answered the question I explicitly said can we have an arbitrary size. Can we do Python programming in Windows? Definitely. Python is cross platform you can do it on a Mac, on Linux, on many cell phones, on Windows it is cross platform. So you can but the only thing is you will have to download Python and you will have to download any other libraries that you need by yourselves and it is easier on Linux because there is a package management tools make it very convenient. There are other commercial distributions available for Python on Windows and Mac but that is kind of out of the scope of this discussion. But yes you can program in Windows. What is the maximum size of an float in Python? Well again you can write a small program to find out the answer. If you want to find out the details look at the IEEE I think 8, 7, 5, 4 or 8, 5, 4 standard it will tell you all of the details of a double precision floating point number which is what Python uses.