I am going to just quickly outline lists. So, creating lists you have already seen a simple example. So, creating lists the easiest way to create an empty list has to do open bracket close slotted. So, empty to create other more complicated list we have already seen several examples spam x 100 1.234 is again a list p is equal to this is also a list and notice that the list can have all kinds of elements including other lists.  So, q is this a is 1 2 and now I will put q itself into this that is also legal. So, a is now 1 2 1 2 a 0 1 2 3 4. The nice thing about lists is you can access elements and you can also change them. So, if I want to say q of 0 is 100 q becomes 100 1 2 3 4. Notice that a is now 1 2 1 2 3 4 and a also has this reflected. So, when you pass in a variable and store it inside a list like here that q is the same q, they are the same q they are not copies. So, the points to note here is empty list creation is simple. List can be empty with no elements in them. List can be heterogeneous with every element of a different type as seen in these examples. Accessing elements again we have seen this for list string. So, I am not going to belabor this p of 0 is the first second fourth element. p of minus 1 will give you what the last element minus 2 will give you penultimate minus 4 will give you the fourth element from the last just like in strings. And just like in strings q of minus 4t will be a index error. It will say list index out of range it is not inside a reasonable range. Index starts from 0, indexes can be negative, indices should always be in the valid range. To find the length of a list you use length already this has been discussed. So, indices should basically be within the range 0 to length of p similarly with the negative indices. So, how do you add and remove elements? The nice thing about lists are mutable that is they can be changed unlike strings unlike an integer. The integer itself is a constant I mean there is nothing you can do if I say a is equal to 1 there is nothing more I can do to it. I can say a is equal to 2 which means the variable a is now changed to 2 but 2 itself cannot be changed. However, lists can be changed as an element it is a mutable entity. So, if I take empty if I take p is empty list p dot append so again how do I find the various name methods for a list p dot tab and you will see there is append over here ignore all of the underscore methods p dot count extend index insert pop remove. So, let us see what p dot append does p dot append says L list dot append any object. So, it append this object to the end. So, if I do p dot append one more p has become one more it was an empty list p dot append what do you think will happen here. In this case it will add the list 1, 6 so it becomes one more comma 1, 6 it is not one more comma 1 comma 6 please note the difference if you want to do that you need to use p dot extend. So, p dot extend will take the elements from that sub list and add them to it. So, for example, if I do p dot extend then it does what you had expected in the original case. So, now how do I remove elements p is this now let us say I want to remove 6 I can say p dot remove 6 in which case it has removed the last 6 it will not remove this. However, if I want to remove a particular index I can say del it is again a keyword p of 1. So, to remove a specific element based on an index you must say del you must use the del keyword if you want to remove an element by value you use the remove. So, now let us look at this simple case I have p is equal to 1, 2, 6, 3, 4, 6. Now, if I do p dot remove 6 which one will you which one do you think it will remove. So, the documentation is very clear it says remove the first occurrence of the value. So, if p is this p dot remove 6 will be will return give me the list 1, 2, 3, 4, 6 concatenating list is very simple we have already seen this. So, if you have these 2 list a plus b will give me 1, 2, 3, 4, 4, 5, 6, 7 put together remember that when you do a plus b it actually returns the new list and the original list do not change. So, which means let us try this a is c is equal to a plus b c is this. So, now if I say a dot append b is this c is still the same thing. So, essentially it makes a copy of that list it is not like you may added these 2 list and magically if you change something to a this it becomes a new list with a copy of all the elements. Slicing and striding again you will notice that many of these concepts are common to all kinds of sequences. Therefore, the results are the same I will go through them simply for repetition so that the concepts are clear for you. So, in this case we have the primes 2, 3, 5, 7, 11, 13, 19, 23 and 29. So, what do you think 4, 8 will do. So, please try the following I will give you 2 minutes before you type this and get the answer on the interpreter kindly predict what you will see this is the only way you will learn if you do not do this if you do not think before you type you will not learn anything you will only be a typist. The idea is we want you to become a programmer and not a typist please think once before you get the answer expect the answer correct your understanding. So, make sure you get all of the possible slicing and striding examples correct. So, for each of these cases make sure that before you type it you expect an answer type it hit return and see what answer you get make sure you are getting the right answer if not your understanding is flawed. If you have a doubt feel free to ask me now this is the third time you are doing slicing and striding. So, by this time you should be a master of this. So, I will do the first 2 examples 4 colon 8 will give me what 0, 1, 2, 3, 4. So, it should give me 11, 5, 6, 7, 8. So, it will give me 11 to 19 let us try I am correct. So, my python is good I do not know about yours what about primes colon 4 what do you expect in this case if I do not specify the first it means 0, 0, 1, 2, 3. So, it should give me 2, 3, 5, 7 ok. If you got this far you have understood the basics of striding. Now, take this example 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. So, can you tell me a simple way by which you can create this list you have already seen it the answer is to use range 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 is now created very good. Now, num 1 colon 10 colon 2 is what again you should be able to predict what this is going to do. So, this will give me from 1 till 9 skipping 2 elements. So, you will get 1, 3, 5, 7, 9. Let us try this is easy you have already seen it this will give me everything till 9 what do you think this will give me this will give me 10, 11, 10, 11. This will give me all of the order numbers all the even numbers 0, 2, 4, 6, 8. Now, this one is a little bit of a trick what do you think the last one will do. So, the first thing you have to understand is yes first thing is the first index is not specified by default that means it should be 0 last index not specified means end minus 1 what do you think this will do ordinarily this will give you nothing or it should give you just 0 because you are saying start at the first guy go backwards there is only one thing you can do there the first element nothing else can be done. But if I do not specify this and I have specified minus 1 you obviously want to do something different. So, if this last fellow is negative and you do not specify the first and the end it will actually reverse because that seems like the most useful feature. So, if not what do I have to do if I want to reverse the list I will have to scratch my head and say give me minus 1 and give me all the way to 0 and even then it would not work because if I specify 0 it will give me 1 before the 0. So, I do not get the 0th element. So, I must do this therefore when you give this it actually does a reverse. However if I did this it will simply give me a copy and this is equivalent to this which is also a copy. So, if you understand all of this you have understood slicing and striding rather well. So, if you do not follow this I suggest you go through the slides and repeat these exercises yourself. So, your understanding has become clear this is very important. So, now we come to some useful things lists also have. So, let us take a is the range say 5, 1, 6, 7, 10. So, a dot s tab will give me sort. So, do not look at this function because the actual signature is very complicated little more complicated than you may be familiar with L dot sort basically says it takes some bunch of arguments. But notice that these arguments are already specified says CMP is none key is none reverse is false do not let this fool you basically means I can simply do a dot sort without specifying any arguments and it is legal. Notice that when I did a dot sort it means it did not return anything there is no output. If I type a now and see what I get I get all the elements sorted. So, sort does an in place sort it does not create a new list it modifies the same list efficiently and sorts the elements. What you are seeing in this help documentation is that if you wanted to sort it in a different fashion you can supply it a function which takes 2 arguments x and y or call it takes 2 arguments and returns either minus 1, 0 or 1 depending on whether x is less than y or x is equal to y or x is greater than y. So, if you know how to create functions you can basically do sorting like this. You can also do reverse sorting by saying reverse equals to which case it will do a reverse sort. Now, sometimes certain things do not have a sort method. For example, if I take b is hello b dot sort does not exist because b does not have b is not mutable I cannot do an in place sort on b. So, it does not provide. So, there is a built in called sorted which will actually sort any sequence. So, if I say sorted of a it will also do the same task okay. So, you can use sort if you want to do an in place sort on a list or you can use the sorted method for any iterable and it will return a new list okay. So, if you want to learn more about sorted question mark it always returns a new sorted list you have to remember that. So, reversing again is available. So, if you have a, a dot sort, a dot reverse also exists a dot reverse will not sorted it will simply reverse the elements in place. So, for example, let us say a is let me go back. So, a dot reverse here will simply give me 10, 7, 6, 1, 5 it is not sorting it. Unlike sort with reverse is true which sort set in reverse order a dot reverse will simply take the elements and reverse it. It is essentially equal to a is a colon colon minus 1. So, that is pretty much going to do the same thing okay. The difference between the reverse and this fellow colon colon minus 1 is that when you do colon colon minus 1 it returns a new list, but reverse does not reverse is sorting is reversing the elements in place. So, it is essentially doing swaps is this clear? So, reverse does an in place reverse colon colon minus 1 does a creates a new list. So, we are done with lists now. So, we are on target, but there is a question someone asked me about. So, we had this list noon and he wanted to know what is happening when I do noon minus 1 colon 0 colon minus 1. So, what is happening? What I am doing here I will clear this. So, it is easier for everyone to view. This is noon. So, noon minus 1 colon 0 minus 1. So, what is this saying? This says the first index is the last fellow minus 1 means last element which is 11. So, start at 11 go in steps of minus 1. So, it means 11, 10, 9, 8, blah, blah, blah, blah, blah till 0 not including 0. Remember that the last index you specify does not include it. So, if I specify 0 it will only go to the first element. So, this will give me 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1. It will not give me 0. However, if I do not specify this, it will mean end of the sequence which means it will also give me 0. And if I do not specify minus 1, it does not mean it starts at 0, but because the last striding is minus 1, it will start with the last element and give you till the first element. So, the minus 1 case is a little special. On the other hand, if I did this what would happen? So, what do you think would happen in this case? Those of you who have understood well will get the right answer. So, let me go through the answer. Minus 1 colon 0 colon 1 will say start at the last element, go to the first element of the list, but go positively. I cannot do that because I am already at the last element. If I go one beyond that I am outside the list. Therefore, this will simply return a single list, a list with a single element level. So, it did not do what you expected. So, you say minus 1, 0 and you strided to 1, you are basically saying I want to iterate in the negative direction, but you cannot because you cannot stride positively once you are at the end of the element. Therefore, it does not return anything at all. Whereas if I did this, the last index is still available. So, what is happening is when I do minus 1 colon 0 colon 1, what is the first index it has minus 1. However, this minus 1 is well beyond 0. I have explicitly told in this line that I do not want, I want everything before 0, but before 0 there is nothing. Is this clear? When I do this, I say from minus 1 give me to the end in steps of 1. This will therefore give me the last element. Whereas when I do this, I am saying from minus 1 which is the last element give me everything till before the first element. There is nothing before the first element. Therefore, this cannot return anything. So, these are all corner cases. So, somebody has the question noon minus 1 comma 4 comma 1. What do you expect in this case? So, if you have actually, so should I subtract 1 minus 1 mark for you, this will give you an error. You have never seen me type this syntax so far. This minus 1 comma 4 comma 1 is wrong. It is a type error. No, it is not semicolon, it is colon. This is also going to give you the same problem because the end of the element is 11. So, for example, if I did this, this will give me 11 because I am asking for elements till the 12th element. So, I think most of you should have gotten the concepts till this point. If you have not, you have not asked me a question. Therefore, I assume that you have understood everything properly. So, let us do a quick recap of what has been covered today. We looked at the basic language, how are the features of the language. Then we looked at the basic data types, specifically we looked at integers, floating point numbers and Booleans. Then we looked at sequences. In sequences, we looked at strings, lists and tuples very briefly. The idea was to get a overall perspective of what is possible with sequences. We looked specifically at how you can check for container ship, how you can iterate over the elements. Well, you can see how you can iterate over the elements but how you can check for existence, how you can access the elements. All of that was considered in the overall big picture. Then we looked, we spent considerable amount of time looking at slicing and striding. Then we looked at strings. We looked at how to define strings, what is the need for all so many times of strings. How do you do simple assignment and arithmetic? How do you access elements? We mentioned the fact that strings are immutable. So, you cannot change the value of a string in place. Then we looked at a simple problem and how we solve it using strings. With one line of code, we were able to do it. In order to do this, we had to review the content on slicing and striding. We also looked at string methods. We looked at a few of the methods. In all of this, we used heavily the IPython feature of tab completion and the history. As well as the question mark, I have been constantly reinforcing the use of. We then looked at one very powerful and useful feature called join. You may not see the use of it right now but later on, when you are actually writing code doing string manipulation, you will find that it is a very convenient feature. Then looked at conditionals which is basically if, l if, else that block. We mentioned that the else is optional. We also looked at the ternary operator which makes it extremely easy to write in one line, what would normally take four lines. We looked at pass and then we looked at loops. We looked at the while loop. Basically, it is while, conditional, colon and then a block. The block indicates the actual content of the loop.   Then we looked at far. We looked at several examples and we also looked at range. I explained that range is very similar in its syntax to the slicing and striding operation. We looked at break. I mentioned that break basically gets out of the innermost loop. I showed you an example of a nested far loop where I demonstrated that it only stays within the innermost loop that is where it exists. It does not exist the entire loop. We looked at continue. Someone asked me the difference between pass and continue and I clearly answered that. Then we looked at list in some detail. We looked at how to create empty lists, how to manipulate lists, how to create complicated lists with elements of different types. How do we access elements? We elaborated on negative indices and we also looked at what is the validity of these indices. Then we looked at certain key or important list methods like append. I also demonstrated the use of extend. Once again, if you have confused or you have doubts, you can always use the interpreter, try your own experiments and use the question mark feature of the IPython session. We showed how you can remove an element using dell or remove concatenation of lists and then we spent fair bit of time doing slicing and striding. I went through all of these examples and spent fair bit of time on this. Then looked at a few additional methods like sorting. This is an in place sort. This produces a new list. Sorted produces a new list. Then we looked at reverse and again colon colon minus 1, this special form produces a new list. We now begin the afternoon session with input and output. So far we have looked at print, print statement. So consider the example that has been typed out. When you say A is, this is a string. When you type the character A in your IPython session, it is actually not printing anything to screen. IPython is simply giving you a convenience when that expression evaluates to this is a string and therefore showing you that expression. On the other hand, you could do the following. Print A will produce no output but it will actually print it on screen. So this slide basically highlights this. It says what is the difference between A and print A? Typing A shows the value but print A prints it. Note that when I did the value, when I said A, you actually see the quotation marks on the ends of the string. Whereas when you do print A, it actually gives a representation, a string if I had representation that is represented on the screen. So if you had a Python script and you just put a B inside, it will not show you anything. It will basically only, only when you do print B, you will actually print out that line. Now in addition to the elementary processing that you can, printing that you can do with print, like print whatever string, if you are familiar with C, Python also supports this special syntax which is commonly used in C as follows. So let us say you have x is 1.5 and y is 2 and let us say z is zdd. Then if I do this print quote x is percentage point 2.1f, y is percentage d and z is percentage s followed by a percentage x, y, z enclosed in parenthesis. What this will do is it will take x, substitute it into this. What this is saying is give me x represented as two places with one decimal place after the float. So let us try this, x is 1.5, y is 2, z is z, print or before I do print, let us just try the string itself, x is percentage 2.1f, y is percentage d, z is percentage s. So percentage f means float, percentage d means integer, percentage s means string. So this has returned the string. So if I say print, it will not give me the string value but it will actually print it on screen and saying x is 1.5, y is 2, z is z. Now what if I made this, percentage 2.3f. Notice that it says it is 1.5 double 0, it means you are specifying 3 decimal places. So the nice thing is this allows you to do some simple formatting and it is often useful. This is a standard C way of representing of doing string manipulations and it is also documented inside the python documentation. So do the following exercise, create in an editor, use a text editor, do not use Microsoft Word, are they familiar with this from yesterday? Fine. So if you have used g-edit, please use g-edit in order to create a file and type out the following code print, hello, print world, print hello, comma, print world. Notice that there is a comma here. So let me do this. I am going to use win. Please use whatever you want. I am going to say print. I am typing something slightly different to illustrate a point. I am going to save this. That is the example that I have. In order to illustrate something, I am also going to do something interesting. I am just going to type a here, just like in the interpreter. So if I want to see what is in the current directory, if I do bang ls, I can see print example in that directory. Notice that I did bang ls, bang is a special feature of ipython, which will let you escape to the underlying shell. So you can run shell commands from within ipython. Similarly, cd is a special thing supported by ipython. cd dot dot change the directory to the parent directory. You need not do this. Make sure that the file you are editing is available in the directory from which you ran ipython. Now I can do percentage run. Notice that it printed hello, so I will run it again. Hello world, hello world. And I will show you the code. That was the code. So the answer here is given in this last slide. It is saying print x adds a new line, whereas print x comma adds a space. So if I just say print hello, it prints hello and a new line, print world, new line, print hello comma, therefore it only gives a space and then world, which is what you see in the screen here. Hello world, hello world. Notice that in my code I have also just typed a like we did in the interpreter and it printed nothing. Is this clear? So when you just type a, it is just an expression, ipython or a python is simply showing you that expression, the value of that expression for your convenience. An actual python script will not do this. So what we have done over here is we have basically created our first python script. This file is a python script. Now I have run it like this. I could also run it like python print example. That will also do the same thing. But run is a very convenient thing to be able to do. Without leaving your ipython session, I can run the session. So it is very convenient. It has some other features which I am not discussing. So the essential point here is to create python scripts is very easy. You just open a shelf, you just open a text file, put the python code inside it and run it either from ipython using run percentage, percentage run print example or you run it on the command line from dollar, from your bash shell as python example, whatever, file name dot py. The only key important thing you have learnt new about the print statement here is that if you put a comma, it does not add a new line but it adds a space. You can also try the forward print. This will also work. You do not have to put it on a separate new line. So you can put as many of these. So now we have learnt how to create, how to print things on screen, whether we run new line or no new line. We also have learnt how to create a simple python script. So are all of you able to do this?  Do you need some time? If you need time, please raise your hands because I am going to move on. Move on or wait? Wait. I will give you two minutes. Please make sure you are able to create the following file. I will move back to the slide that is necessary. Save it as print example. Do not use Microsoft Word or OpenFace or anything else. Use a simple text editor. Use either g edit, vim, emacs, any text editor will work. So I will give you exactly two minutes to run the python file. Use this percentage run print example. Make sure you are on the same directory as that. If not, use the cd command to move to that directory. Another 30 seconds you have. Is everyone done? You can also run the example from the shell. So we are moving on now. Two minutes up. So I hope all of you have been able to create a simple file. If you have not been able to, please do this in the break or some other time later. It is very simple. Idea is you create a text file, put your content in it. How to open g edit in python? I suggest you do not. If you want to, you can do this I think. g edit, it works. You do not have to do it that way. I would suggest you do it in a separate session because ipython shell is not as powerful as the shell itself. It will allow you to do many things but it is not a replacement necessarily for your shell. So I suggest you use the other shell or start it from your applications menu or something like that. But you can use it like this also. Let us move on. Now sometimes you want to get input from a user. Very often unfortunately this raw input function is abused but I want to get into those details. But in case you have to get input from the user for whatever reason, if you do this raw input function, excuse me, let us try it. What it does is, it basically waits for me. Now let us type some nonsense. Once you hit return, ip will, so what is the type of ip? String. So raw input will always give you a string. Now someone has asked the question, can we use Linux commands in python? The answer is absolutely no. Not in raw python.  What I have been doing so far with my g edit, all that bank commands is basically to use ipython special functionality. So it is an ipython specialty. This is not legal python. Bank LS is not legal python at all. So it is only a convenience to run when you are doing interactive exploration. It is convenient to do this. That is all. It is not legal python. So here is a simple example. Again c is raw input. If we enter 5.6 and hit return at this point, the value of c will be 5.6 but the type will be a string. Now sometimes raw input, you may want to say something. So you may want to say raw input. It will then pause for you asking your name. Then you can say, in this case it is an empty string. So you can basically display a prompt and obtain the results from that prompt. Many people abuse this to ask for input in every single program that they write. It is not a good idea unless and until you actually need the user to give you direct input. Asking them on a prompt is not a very convenient way of doing it. But it is useful functionality if you have to ask the user for some input. So this is just input and output from standard input and standard output. So how do I get input from the user? How do I give him output? But more often we have to deal with files. So let us see how we can work with files with Python. So in Moodle, I believe Srikant has made available several data files as part of this course. So if you untar those files, you will see inside that directory structure, you will see a file called pendulum.txt. So let us explore how to read that. So for me it is in desktop Python files. I simply did cd to whatever directory which contain these files. In my case cd desktop Python files. So if I am somewhere else I can do cd tilde slash desktop Python files. Now I have all the files. If I want to open this file, I simply say f is, remember f is a variable so it could be anything you want. f is open pendulum.txt. Notice that iPython will also do command line completion for file names. So you can just do tab. f is basically an open file pendulum.txt open with a read mode. So I can now read this file. To read the entire contents of the file, I can say pendulum data is f dot read. Now if I put printpend, firstly what type do you think pend will be? It is a string. So let us print the first 100 or 10 characters of the string. How do I get the first 100 characters? The string, the first 100 characters are obtained like this. So if I printpend itself, it is the full file. So it is that easy to read a file. f is open pendulum. f, this pend variable now is a string containing all of the data. Now supposing I do not want it to be the whole file but I want it split in terms of lines, it turns out that pendulum, that string has a method called split or split lines. Let us see what it does. It returns a list of strings which is broken at the line boundaries. So which means if I say p list, it has 90 lines. So let us print the first 5. So let me repeat what we did. We first got f by saying open file name. We read the entire file contents by saying f dot read. The variable what is read is a string and now we convert the string into a set of lines by doing p list is pend dot split lines. Pend is a string variable and each of these, the p list is basically a string. So each line is stored in a separate element in this list. So the first element, so p list is the first line, second line, so on and so forth. Now that we have read the file, what do we do? We should close the file. So we say f dot close. Remember we read all of the file contents by saying f dot read. Now if I say f, it will say closed file, pendulum dot txt mode r. Which means the file is closed. Recapping, open. Now this open line can be a full path also. It does not have to be a relative path. So you can actually say slash ohm slash user name slash desktop slash python file slash pendulum dot txt is perfectly fine. You read the contents with f dot read, split the lines and close the file. Now often you do not want to just do, you do not want to read the whole file. Instead you want to read line by line. So in that case you can do the following. So I have been asked to repeat, we asked to repeat files. I have repeated this already three times and I will do it again. To open a file all you need to do is you use the open function which basically is given a file name as an argument. It has other optional arguments which I am not specifying. By default it will read a file. So f is open this file. To read the entire contents as a string I do f dot read. So it is very simple. f is then this will read the entire contents and this will produce the entire file will be split line by line into elements of a list. So the first line will be in the first element, second line, second element, so on and so forth. Finally to close you do f dot close. Is that enough? I have repeated this four times now. So I am going to move on. Now sometimes you do not or very often you do not want to read everything in one shot and just produce one massive list. Imagine this has a million lines. In which case you want to iterate over each line. In which case you can simply do for line in open. In this case I am simply printing lines. You can imagine that inside this for loop I can do all kinds of complicated things. For example I could create an empty list outside and every line I could just append into that list. So then I will create a list containing every line. What did I do? In the first case I printed print line. So which means each line also has the new line character. So it is printing that new line character as well as print k bar I have not given a comma so it gives a new line. That is why it gives it each line separately with a new line in between. That is if I do print comma, line comma it does not print the additional new line. So basically what is clear here is so far I never told you that you can I only told you for N in range or for N in some list. What happens is underneath in Python there is this concept known as iterable. An object can be iterable. So a list is iterable. A string, any sequence is iterable. It turns out that a file is also iterable. That is the reason you are able to say for line in open pattern. So this is a common pattern that you will see across lot of Python code. Many objects are actually iterable which means they can be iterated element by element. A file is a very natural thing and in this case when it iterates over every element of the file, it iterates over every line of that file. So now supposing I want to do this, instead of printing I want to collect a line set of lines in the list. I can simply say a line list is empty for line in open pendulum list, line list dot append line which is exactly what I said. So now let us look at a nice problem that we can solve given all that we know about Python so far. So let us say we are given this string. We are given a string, some string a, semicolon 0 1 0 0 0 2, semicolon r, semicolon 0 5 8, semicolon 0 3 7, semicolon 42 3 4, semicolon 3 4, semicolon 35, semicolon 40, semicolon 2 1 2, semicolon t, semicolon semicolon. This is the string. So imagine, so you can understand what kind of file this is. As teachers this looks like a student's mark sheet record. He is in some state category. He is in either math or science or social science category. This is role number, his name. This is marks in mathematics, science, no language sorry, this is language, oh sorry, first language, second language, mathematics marks, science marks, social studies marks, total marks. P slash f will be pass fail, w is withheld otherwise empty and the first character is the region cone. In this case it is a. Now let us say we have a file with a million records like this. Every line contains one student, his region, role number, name, marks, total marks pass or fail. We want to calculate the mean of the math marks in region B. This fellow is in region A. So take all the fellows in region B, calculate the mean of their marks, the average marks obtained by fellows in B, fellows and felis in B. How do we solve this problem? So we will learn the respect, the necessary bits of Python in order to solve this little problem. So first thing is if it is a file, it is a text file. We know how to read it line by line. We can say for line in open file name, you will get the line, every line you get. Each line contains all of this stuff. I now need to take this line, process the line, find out with which region code he is, then find out his total marks and select all of these total marks and then find the average. That is going to be our structure. That is how we are going to approach the problem. So let us see what we need to know to do this. So we will slowly build up our Python knowledge to be able to solve this problem. These are typical problems that we will need to solve later on. So first let us start with tokenization. What we need to do is we want to be able to split this line into the element that are constituted by. So let us say I have this record S. S is a string. Strings have a method called split. So let us look at what split says. It says split is given an optional separator and it will return a list of strings. So basically it returns a list of the words in the string using sep as the delimiter string. So which means in this particular example that we have my delimiter is semicolon. But before we do that, let us look at the original example. Now line is a string. Let us see what happens if I simply did line dot split. Notice that it removed all the white space and gave me three elements in a list, one with parse this string. So by default, notice the help documentation that is supplied here. If separator is not specified, any white space is a separator and empty strings are removed. So line equals parse this string and I split that, I get parse this. Now if you look at S, this is another string. So if I do S dot split, what do you think you will get? You will get a list because it says it will return a list of strings. But the list of strings will only have two elements because it is going to split on white space. Where is the only white space in this? For example in this, there are two white spaces. There is Joseph, there is a white space and then there is after Raj there is.  So let us see what we get. That is exactly what we get. In the example that is shown here, if we split without giving this separator, it will give me 3. But supposing I say A S dot split semicolon, it will do what I want. It will split it as A roll number, name, first mark, second mark, third mark, so on and so forth, total marks, parse fail and two additional fields. So this is how it is very easy to do tokenization with Python. So now let us add a little wrinkle. Remember that we had S dot split. Now imagine that in my text file I did some ratification. So let us say my string was this. Now if I did split, notice that the A now has suddenly spaces because I only split on semicolons. So if I take the first element, the fields are S dot split. Fields of 0 is not just A but it also has the space. Why? Because I did not split on empty, on white space, I split on semicolons. So now if I want to remove this white space, I can simply do, remember this is a string. Strings have a whole bunch of methods. One other very useful method is called strip. Strip will remove all white space, either leading or trailing. So let us try another trick. What do you expect? Remember that strip will only remove the leading and the trailing. It will not remove all white space. It will only remove leading and trailing. So it works for us in this case. Fields 0 dot strip will simply give me A. So now even if there is space inside the string, if I strip it, I can easily find out region codes A or B or whatever it is. And please remember strip returns a new string. It does not change any existing string. So let me recap. What we are trying to do is take this record, try to split it, get the fields, then do our calculations. So we looked at split. Without arguments it splits on white space. With arguments it will only split on what you have given it. Therefore you may have the problems if there is space and you have to remove the space you can use strip. Now notice that all of the marks. So when I did S dot, if I look at fields, the fields are A, roll number and so on and so forth. Notice that all of the marks are basically strings. We have already seen that to convert a string to a float, if you remember the ternary operator, I clearly said that you can do int of and that will become an integer. So you can take each of these arguments, each of the values of this list, elements of the list and convert them to a floating, to a integer. You could also convert it to a floating point number by doing float. So now we have enough machinery to be able to solve our little problem. So let us look at the solution. So I will go through the solution line by line and after I go through the solution if you have any questions, please ask me. So the first thing is we create, what do we have to do? What is the task? Let us go back and look at the problem. I have a file which has some 5 lakh records or something like that. Let us see. So it has 1.8 lakh records or 5. So lot of lines. So for example this is actual data. Now we want to take each of these records represents a student. We want to find the average marks of all the students in region B. That is our task. How do we do this? We need to first iterate through every line of that file, identify the region code. If the region is A, we need to add it to some list or something, keep on adding, adding, adding. Then we can find the average. How do we do that? Let me look at the code. First we create an empty list to store the marks. Easy to create. Then we iterate over every line for line in open SSLC.txt. Here there is a 1. I do not know if that file is there. Whichever file works. Then you first split the fields with the separation operator semicolon. The region code is fields of 0. Region code dot strip will remove the space so that you get a unique code. Remember if I give you 2 records, if I am trying to check the equality of 2 strings, if there is a space in between I cannot, they will not be equal. So you remove all the space. Then you find the math marks. So if I want to find the math mark, I think it is the 5th field. So the 5th field is found. I convert it to a floating point number. Then I say if the region code is B, math B dot append math mark. Finished. Then math B dot math B mean is sum of the math elements divided by length of the math. Finished. So extremely easy. So let us now run this quickly. I am going to write slightly shorter code. Marks is for line in open SSLC.txt. I am splitting on every line, splitting every line on the semicolon. Then I am saying region code writing it little shorter. Math mark is float of fields 6, 5. If region code is equal to B, finished. It has read all of the file. It has read the whole file and let us see how many fellows there are. There are 41,000 fellows in region B. How do I find the total of all their marks? There is a built in called sum. Given any sequence, it will return the sum of the sequence. Sum of marks divided by length of marks. So the average math mark in region B is 63.63. And all it took was 1, 2, 3, 4, 5, 6, 7 lines of code. 8 lines of code. We have read 1,80,000 records. Figured out some, we did something interesting. Passed each of those lines, found out all the fellows in region B, calculated the average. And this is the power of Python with which I am able to quickly read files, quickly do string processing and manipulation, do some basic arithmetic and do things. So now we go to a very big topic, very important topic. So if you have any questions, please ask me now. If not I am going to go to functions. Is this code example clear? If you have any questions, I will give you 5 minutes now. Let us go through questions now. Any questions now? If you do not have questions, no problem. Good question. How to use files for output? Do not think we have slides for that, but it is very easy. So let us say I say output, open. Before we do that, let us look at open. So open way, you can give it a mode. You can give it a name of a file and you can give it a mode. So let us do that. So output, open. I am opening some file in slash tmp slash test dot txt and I specify write mode. Now this is a file that I can write to. Out.tab tells me that I can close the file, tells me I can flush it, I can put new lines, I can go to the next, I can read and in the bottom here which is what is of interest to us, I can read, I can write. So I can say write. Notice that in write I have to explicitly put new lines. If I want a new line, I did not close the code properly. Please note my error message is very clear. It says hello world. At this point it found the end of line and it could not find the end of the quotation. Now if I look at the file, there is no guarantee that the file is actually written. So if you actually want to make sure it is written, you can do either out.flush if you want to continue writing or you can do out.close which is even better. Close the file, what is this called? Test. Done. So it is as easy as that to write files, ASCII files. You simply open, you simply use out open and you specify this additional argument w. And then you use out.write and you say out.close once you are finished. Now the modes, they can have different kind of modes. So you can have something which you want to append. I think you can do. So append mode will let you append to a file. Write mode will create a new file. So if I did write, so let us try this. It is gone. So it creates a fresh file. So if you do write, it is gone. If you do append, it will append to a file. And if you do not specify anything, it will just read it. If I did this, out would not be an output. I cannot write to it but I can only read from that file. Does that answer your question? Any more questions? What b refers to an example? Oh, it is a region code. It could be Maharashtra, it could be South, North, East, West, some region code, some data. g refers to, I will show you, some region, some code for a region. So it could be, it could be for example North Maharashtra, South Maharashtra, East, West, some coding, encoding that they have. Can we take some function as procedural feature of Python? Some function is simply a function that is provided by default in Python. There is no procedural feature. It is a function that is available by default. Well, so the other question is b and b are equal or I need to use lower upper functions. Well, if the recording is consistent, everything will be capital but if that is not the case, then you will have to do something like that. You will have to check lower, always lower it and check for a and b. That depends on the data. So the question is, I mean if you have little b or capital B, does it make a difference? That depends on your data. Someone has taken the data so you will have to know something about the data to make the decision. So that is the decision that depends on the data and even in that case you know exactly what to do. If you know that b and little b and capital B are the same, you simply do region code dot lower and then compare whether that is equal to the type that you are interested in, little b or capital whichever you want and that is it. I do not need flush method in my code because I close the file. You need flush. Flush will basically flush out the stream. Normally if you do a write, the contents of the buffer will not be written. They will be buffered somewhere. They may not be actually written to disk. When you do flush, it is forced to write to disk. If you do close, it will do the same thing. It will essentially force it to close. So flush is just a convenience if you want to make sure I have written the file and it is seen. So if you are continuously writing and somebody else is looking at the file to check something, if you want to definitely be certain, want to force the buffer to be flushed to the disk, you can do that. I think we have spent 5 minutes. I think most of the ideas are essentially clear.


Let me just welcome everybody. Welcome to the Future Trends Forum. I'm delighted to see you today. Today is a special session of the forum and I'll explain why and how important this is in just a minute. Now let me explain a couple of things. First, this is a special session, and that is we are creating this session because something very dramatic, very significant, has just happened. Two major Supreme Court decisions. So I think of this session, which doesn't take place in our normal slot, as a kind of emergency meeting. This is where we can quickly explore, try to understand, and start thinking about one of the most salient events to happen in higher education in the past few years. We haven't really done this before very much and I'd be curious at a meta level what you think about it. Now, the subject that we're looking at is, of course, two very recent Supreme Court decisions, one of which shut down affirmative action as an admissions criterion in elite higher education, and the second one which shut down the Biden administration's effort to try to forgive some student debt. Now, what do these mean for higher education? What do they mean for individual academics? What do they mean for academic programs, for questions, and for all kinds of choices heading forward? That's what we're going to be exploring today. And we're in the hands of two excellent, excellent people, two great professors at two great universities, both of whom specialize in, among other things, law and what it means for higher education, both of which might be familiar to you before. Zack has been a guest in the program and Mark has been a redoubtable participant. So without further ado, let me just bring up the first of these. Zack Blamer, and I'll bring you, just mentioned, as I'm bringing him up, as I was trying to build out the website for this program, Zack's entire life changed. He was at a small college in New England called Yale, and just this past month shifted to another small joint in the East Coast called Princeton University. Zack, welcome aboard. Great to see you again. Hey, thanks very much, Brian. Good to see you all. Oh, I'm really glad you could make it. I'm really looking forward to what you can add. I'm, I'm curious, I've asked you this before, but your life has changed a bit. So I guess the question, your answer might change too. What are you looking forward to for the next year of your work? What are the big ideas and what are the big projects you're going to be focusing on? Yeah, so I think I should probably set people's expectations for the next hour beforehand, because I've spent the last couple of years thinking about race-based affirmative action and other race-neutral alternative emissions policies. I'm not sure, I mean, I have so much to say sort of outside of that scope. I think there are a lot of possible things that have pretty dramatically changed higher education the last week that we ought to talk about, but that's sort of, that's what I've thought about, and I think we'll be able to best contribute with regard to. For the next year, I'll be thinking a lot, well, we're moving to a new institution, but also thinking a lot about the sort of integration ramifications of ending race-based affirmative action, as well as thinking about what happens inside of universities, especially around college major choice, when kids from different backgrounds come in and are either choosing what to major in or, as is the case at many public universities, these choices are being made for them using GPA restrictions and other policies that limit kids' access to certain college majors, which interact in interesting ways with emissions policies. Oh, fascinating, fascinating, especially majors. I haven't heard anyone talk about it. We're going to have to ask you about that in just a minute or so. Let me right now put on stage your fellow panellist and our great friend, Mark Rush, and let me bring him up on the stage as well. Hello, sir. I can see you, but cannot hear you.  Yeah, Wesson, I think you get to swing into action here. And Mark, while you're working on that, just make a noise when it's back live and we'll rope you into the conversation. Mark is, among other things, a wonderful advocate for liberal arts, liberal education, and he is also a major advocate for international education. And he is also someone who has done a great deal of work on the law. And so I always turn to for legal and policy questions. While he's working on that, Zach, in fact, let me just get him off the stage so he doesn't have to keep me ogling at us. Zach, just to begin with, thinking about this huge decision, what's the shorthand for referring to it? Are we going to call it the Harvard decision or the students decision? Yeah, exactly. It's either the SFFA decision or the decision against Harvard and UNC. Okay. Okay. And friends, before I dive in, let me just say this is a... I'm going to ask our excellent experts a couple of questions, but then I want to get out of the way so that you can perform your questions and your queries. So please, don't at all be shy.  And again, this is a very, very fast moving topic. This has just appeared in the world. So if you have questions and you're nervous about them, don't be nervous. There's a lot to talk about here. So I'll call it for sake of argument now. I'll call it the SFFA. SFFA, Students for Fair Admission. Fair Admission. Okay. So the SFFA case, the majority of the court, 63 ruled that Harvard and North Carolina can no longer consider admissions as an open and explicit category for shaping their admissions process. How am I doing so far? Is that right? Please. Totally. What does this mean for higher education going forward? How do we get to respond? Are admissions offices across the country throwing up their playbook? What's the next step here? It's very interesting, you know, 10 states had previously faced affirmative action bans at public universities, though one, in the case of Texas, it was invalidated years later. And so we have a sense of, you know, sort of from a bird's eye view, what happens when universities year over year suddenly are unable to use race as one criterion for admitting undergraduate and graduate students. But in each case there are differences both in the kinds of institutions and policies they were already implementing to provide race big preferences and differences in the specific wording of the policies that were implemented. So, you know, we have this new wording and it's something like 45 pages of summary and decision that was provided by John Roberts last Thursday that gives a substantial amount of guidance to universities about the reasons for which they are not allowed to use race and admissions but also some guidance on how the risk or risk related criteria are still permitted for use in undergraduate admissions. I think the clearest question is there's sort of like a wait and see period as there's now an active negotiation at each of the public and private universities where these policies were implemented between admissions offices, administration and legal offices trying to decide exactly what is permissible and what the admissions policy will look like this coming fall. Oh, that's interesting. So, this really becomes even harrier and more complicated as we try and set this up. Yeah, I suspect we're going to see a lot of different kinds of changes happen at a lot of different institutions. So, one primary difference is going to be between the super selective private universities that received a lot of public attention but which in full a very small number of students. We've never banned certain admissions practices at those institutions and so I think it's sort of unknown the degree to which they'll be able to continue basically so resulting in the same admissions class that they have in past years just making pretty minor changes in either admissions decisions or in admissions justifications to end up with the same resulting class. That's unknown. What we have a better sense of is what happened at selective public institutions, flagship schools in states that have highly selective institutions. What we've seen in states like California, Texas and Michigan, the states with the most selective flagship publics that have previously implemented affirmative action bans have been seen pretty substantial declines in black, Hispanic and Native American enrollment on the order of 30 to 50 percent at those flagship schools year over year immediately after these policies are implemented and then sort of a very different stories at other institutions. So, you get this cascade effect where there's no net enrollment change at mid-tier and less selective public universities because those schools are both losing students and that they're affirmative action policies and gaining students from more selective schools who are no longer able to get into those more selective institutions. So, in expectation we would see that kind of cascade pattern in many of the public university systems that we're still using race based affirmative action. These are schools like UVA and UNC and the University of Wisconsin, Penn State, Georgia Tech, et cetera, but exactly what will happen in private schools I think is somewhat less known. That's interesting. This is even more complicated because so private school, well like your two schools, you know, Yale or Princeton, but versus the leading publics, you know, the Michigan's and the UT Austin. Well, there's other interesting things that could happen. So I think one thing that is possible is that the states that have already seen affirmative actions implemented could get in Hispanic students because those schools were already not doing affirmative action. Now there's a bunch of other schools that have stopped doing affirmative action like Hispanic students who had previously gone to those other institutions are still in large part going to enroll somewhere and many of them could flow back to schools that had implemented affirmative action bans years earlier. So, you know, think of one example, Berkeley and UCLA saw a relatively small but meaningful net outflow of black and Hispanic students to the Ivy League after Prop 209 ended affirmative action in 1998. And it's possible that some of those students will now return to selective flagship public institutions that have become no more admissively welcoming to them, but whose counterfactual options may no longer be available. Oh, that's interesting.  But this may actually play out differently across the nation. Hang on one second.  Let me see if his audio is live and mark. Are you there? Is it working? It is. It's it as everyone says it is so good to hear your voice. Mark, where are you coming to us from today? I'm coming to you from Lexington, Virginia in my office. Excellent. Yeah, you can talk about some of the Red Sox paraphernalia in the background. Oh, I'm not going to go down. But are we likely to be ambushed by your puppy today? No, no, no, he's at home hanging out. Okay. Okay. Okay. Well, that's that's too bad, but I understand understand that's that's very good. Listen, Mark, what's just to carry our tradition of introducing people? What are you working on for the next year? What are the big topics and what are the big projects? Really, I'm working on right now. It spins out of some of the discussion we'll touch upon today, but just the working on a couple of essays talking about, you know, the courts reliance on notions of tradition and how that really compares to Thomas Q's notions of scientific revolutions and I'm arguing that basically the court has to consider how it relies on tradition because on the one hand, you certainly appreciate that. On the other hand, the legislature needs to break from it. Otherwise, you're stuck in antiquated paradigms. So we don't want to navigate by flat earth technology, nor should we continue to administer and interpret the law based on 19th century visions of liberal constitutionalism. So that's what I'm working on. Oh, wow. Sounds very exciting. And then are you and then you're teaching this well for the spring? Well, I'll be teaching a course, our introductory global politics course. A colleague and I are trying to rework that really again and make it look more as a forward-looking global politics course, breaking away from old notions of conflict and whatnot. And then I'll be teaching a course just on the intersection of law science and technology. Which is always great. If you do it with the first year students, they're wonderful. Excellent. Excellent. Well, welcome. I'm so glad that you can that you can join us and bring this expertise to bear. I'm curious. Have you have you heard our conversation so far?  Well, I guess I can build on this a bit. Zach has been great about explaining the ways this starts to impact different institutions and different ways. I'm curious. What what could an institution that wants to really support black and Hispanic students or increase the number of black and Hispanic students? What can they do now following the Harvard case? To tell you the truth, I'll be I'll bring a skeptical response and approach to this. I pretty much disagree with most of what I've been reading in terms of commentary. I think this is going to have very little impact at the very end of the opinion. Justice Roberts left open a couple of loopholes that were very vague. I think essentially admissions offices will have to do a little more homework to demonstrate that they're relying on something other than race specifically. So class or whatnot, SES status will become more of a proxy for it. I don't think it's going to make a whole lot of difference to tell you the truth. In the sense that, you know, when you think about it, you read the decision, how are we going to police this? How will the federal government police and how much, you know, manpower is the government really going to dedicate to making sure that we now what admit 10 more students of one background and 10 fewer of another metaphorically speaking in a class of 1600 to Harvard and then you multiply that by all the universities across the country. I think this is really going to be a tempest in the teapot. I think the more important aspect of the decision honestly is what yet and and the decision about student loans really exposes or highlights about the current state of American politics and really the history of race relations. You know, there was there's been some great writing recently in the times and whatnot saying, yeah, let's blow up the admissions process and really work on not just higher education. At the upper micro sliver of the higher ed structure and let's focus on what's not happening K through 12. Let's focus on, you know, resources that that should be directed perhaps to non elite schools so that fighting to get into Harvard and Yale becomes less of an issue as there are more quality options out there at least as as are perceived by, you know, students and their parents when they're applying to schools. There are a lot of great schools, but we only hear these conversations with a handful and that's really a problem. I think so. That's my quick response. Well, that's a that's a great response. Thank you. It seems like this this problem just really becomes even more complex and now I mean it stretches from the tactical deployment of a given admissions office all the way through to how we rethink all of the education system in the United States, not just graduate schools and universities, but also K through 12 in the chat. People are thrown in a couple of really, really good points. Our good friend George station responding to Zach's point about different states shared a story from inside a higher ed about how one American state, Missouri, just their attorney general just set a letter to colleges both private and public and told them to start changing up their affirmative action policies and admissions as well as scholarship. I believe George. Thank you for catching that and that that does sound more like one answer to the policing question is for a general to do it again. That's just one state to question if that's going to be echoed elsewhere. We also had Patricia Suarez, Patricia, I hope I got the last name right. I'm always dreading mispronouncing that points out that time is ticking quickly along as the common application opens August one. So the timing here is very, very interesting. Let me let me stop throwing questions at you two for now. And I'd love to hear questions from everyone in the group. And again, friends, if you're new to the form the very bottom of the screen at white band, the press the raise hand if you want to join us on stage and of course press the question mark if you'd like to type in a question as an example of the letter. Let me bring up a question from our good friend and polished polished questioner, Tom Haymes who asked why has higher ed resisted income based affirmative action for so long, it's legally simple and would do a better job at diversity than a race based admissions. I'd love to hear from both of you on this. So I can speak to the story in California. That's I think what I know best. So when California passed the ballot proposition in 1996 ending the use of race based preferences, its public universities had to put a lot of thought into how to reform their admissions policies to reduce the preference explicitly on race, but otherwise maintain diverse campuses across the University of California system and some of those policies were made policy changes were made very publicly. So in 2001, three years after the band was implemented in 98, the state implemented this top percent policy guaranteeing admission to most UC campuses for the top 4% of students from every high school. That functions effectively as a class based affirmative action policy and as a policy that tends to increase black and Hispanic enrollment, not by changing admissions in any way at the most privileged high schools in the state. All of those top 4% kids could already get into selective universities, but first kids coming from the least privileged high schools in the state, even whose top students would have otherwise not enrolled at most UC campuses. It pulled those students in those students tended to be lower income and from minority backgrounds and so this had a diversifying effect though, not to the same degree as affirmative action either in terms of race or class, but the University of California also implemented a number of policies that were not as publicly known. So there was a substantially increased preference for students coming from low income neighborhoods for students who came from high schools with larger minority populations as well as high schools with lower income backgrounds and explicitly an admissions preference for students from lower income backgrounds. And so what you see if you just look at like the average income composition of students that say UC Berkeley or UCLA, after Proc 209, the average proportion of students coming from lower income backgrounds fell because race-based affirmative action had been in tendency pulling in lower income students, but it quickly rebounds and you end up with roughly the same number or same share of low income students at Berkeley and UCLA starting in about 2002, five years after race-based preferences ended, that has now persisted through the present. That being said, while the number of low income students is roughly at those universities long-run equilibrium, you nevertheless have much smaller black and Hispanic shares on the order of 30 or 40 percent lower relative to the state population or the high school graduating shares of black and Hispanic students at those schools, as you did before race-based preferences ended. So in tendency class-based preferences pull in very different groups of students. Race-based preferences only slightly increase lower income enrollment, class-based preferences only slightly increase net black and Hispanic enrollment, but we do see universities very explicitly going out of their way to target those students and I think it's very likely that we would see such policies implemented around the country in the next couple of years. There's nothing in the Harvard decision which would make class-based, economic class-based affirmative action. No indeed, I think John Roberts explicitly calls out that class-based preferences would be permissible. It's only raised the protective category. Of course that said the same thing and called out. That's something I think the that was what, excuse me, really informed some of the protests about legacy admissions too. Gorsuch came out and said, hey, just reallocate your funding and your admissions preferences away from legacies and athletes to lower income kids and you can take care of this problem. Which I find intriguing really is essentially what Clarence Thomas said back in 2003 and his opinion in the Grutter and Gratz decision. He said, look, you want to solve your problem and achieve diversity. He told Michigan, you don't have to be so elite. It can be less selective. And again, this gets us then into the question of admission of a university should be. Is it to be selective or is it to educate? I think, you know, when you think about it, if you do a radius around every university in the country metaphorically of say a hundred miles, every university in the many universities could diversify quite easily. So if you change some of the criteria and you decrease the competition for selectivity, you can achieve these outcomes as well. Again, is that something the universities want to do? Obviously not so far. But again, getting back to Zach said, yeah, Robert's, but especially I thought Gorsuch very quickly stated this, that you can solve this problem very easily if you want to. But it sounds like at least in the case of California and that the economic class based solution did not work. If we accept that if we use the high school top 4% of the high school as a proxy for economic class, it seems like there's something while a lot of Latino families are disproportionately located in the lower classes economically, it seems like something is being left out. So it depends what you mean by didn't work. It's true that these policies did not increase Hispanic enrollment as much as race affirmative action, though they did indeed bring in a larger number of low income students. I think it surprises a lot of people for exactly the reason you just mentioned that providing explicit income based preferences doesn't increase black and Hispanic enrollment more than it does. The reason for this is that even within income group that test score gaps between races are very large. So even if you just compare kids with the same parental income backgrounds, lack students have substantially lower test scores than white students who themselves have substantially lower test scores than Asian students. And so what this means is you can sort of think of a test score as being maybe a measure of academic preparation, but also as being strongly influenced independently by both income and race. So being a lower income student means you tend to have lower test scores being a black or Hispanic or Native American student tends to mean that you have lower test scores and these things are sort of additive such that if you just target on the base of race, you tend to get middle income or even in some cases upper income black and Hispanic students on the margin of admission, whereas if you target on the base of income, you tend to get lower income white and Asian students who are primarily academic score margin for admission to universities. And so getting back to what the, you know, the excuse me, analogies in Virginia having their way with me.  So again, and again, I think it's important to keep in mind what are we arguing about here or discussing. We're talking, you know, these cases with pretty elite universities. Right. I think there was a great piece what in the times couple of weeks ago. I know just a few days ago by Aaron Stevens talking about how for the most part this hasn't made too much of a difference because if you get away from the elite schools, the impact of our discussion today has been a different sort of phenomenon. So I think again in the long run, this will be tempest in the teapot. I think what's more important is the debate is set off already though, students protesting outside of Harvard about legacy admissions and so forth and asking really, what is the mission of the university? So this, this lets this is drawing attention to admissions as a whole and other admissions issues. Sure. I have more thoughts on that, but I'd love to instead to hear from our community and dear Roxanne Risken has a comment. She says chat gpt mentions as good as decisions on Fisher versus the University of Texas of Austin 2016 using halitions. Sorry, using holistic admissions policies. I have no idea this is accurate. Can you discuss more about holistic admissions? So I can talk about how holistic admissions works. And again, sorry to be a sort of broken record here, but I may be talking about California today. So let me tell you about it's okay. Lots of lots of evidence. Yeah, it's cool. Like you see Davis so you see Irvine highly selective University of California campuses. So so the University of California through the 1990s admitted students using point-based admission systems. So students those applications got points for say GPA times a thousand plus SAT score plus your scores out of eight hundred on three SAT subject exams. And then they would have application readers go through and say give you out of five hundred points on extracurricular activities or you got at the time explicit bonus points for coming from a black for being black Hispanic Native American for being lower income for being disabled etc. You add all points up. You order all your applicants. You have cutoffs first just an academic cutoff and second a cutoff based on all of these different points altogether and you can you've composed your class just on the basis of these point schemes. Universities since the grass and gritter decisions even in public universities have largely moved away from these points based systems because race became unavailable as a target for these points. And so you see Davis switch to holistic review in 2011 what this would have meant that you see Davis is rather than having this elaborate point scheme. Instead applicants send in applications and application readers to for each application will go through the full application throw out lots of applications that are seen as really having no chance of admission to the university and then have like overall point systems or points associated with each application. So you might have a score out of seven of how competitive the application is at the university and then after all of these applications are scored on this relatively core scale high scores are admitted. Now what this allows readers to do is to say oh this kid has a relatively low SAT score but there are compensating differentials. They came from a one parent household or they went to a high school that was relatively low preparation on average and so we're going to give the student a high score despite the fact that in traditional measures of academic preparation they're relatively low performing. The case yeah as as Mark has said the case rules out using in you in sort of evaluating these compensating differentials but leave some room for universities to for example say that while this student got relatively low test scores they faced discrimination earlier in life on the basis of race and that discrimination itself provides this compensating differential allowing universities to target and admit some of those students and so I suspect we'll see more of that happening. Now it is sort of unclear in the 10 states that had previously whether these kinds of sort of second order were used explicitly but using ramifications of people's race and their application sort of unclear whether prior to see it prohibited those uses in the dates with the form of action bans to the degree that that was sort of the national band now looks sort of like these state bands but I think we would still expect to see large black Hispanic enrollment declines at schools even those already implementing holistic review because this explicit race information again the only evidence I think that we have to suggest that that's what would happen is looking at what happened that I've highly selective schools in California, Texas and Michigan but but there's a lot of sort of criteria that universities can point to in holistic review that in many places in many cases replace the informational content that race provides and so especially it's super selective private schools it could just be that these things sort of cancel each other route if if you will that that's that's on the demand side where the the university admissions office and and their associates but also I mean I think on the supply side is it not just kind of an open secret now we're best practice for the any students who is a black or Hispanic by identity that then they should emphasize that in their personal statement or in other ways that's for some of the criticism is said you know in the various and Sunday postmortems of the decisions is that this will simply gamify the application process or there were everybody will be looking for you know looking for a hook in that respect one thing to keep in mind to speak in the spine demand side Brian you know again for whom is this a problem and again I refer you to having Aaron Aaron and Stevens again on the fourth of July for schools that again I hate the terminology but for schools who are less selective who take more of their application sure much less of of a problem it's the ones like a Harvard despite their resources where you have 60,000 applications or what 600 600 600 to 1.5 you know applicant to seat ratio on this more holistic though this will be holistic cubed you know application reading process is going it's going to make an already expensive process extraordinarily expensive again tell the faculty who are always complaining about the hiring of too many staff that we're now going to quintuple our admission staff so we can give ably every application though bananas so follow what you will this again is really going to make a real difference at that micro sliver of elite schools where they have to deal with extraordinary number of applications if you're less selective you have more seats this will it'll be much less of a problem to diversify your student body so if you're in if you're in middle tier state university or lower tier private college you're not going to be able to quintuple your admission staff in order to do a serious list of reading on the other hand you aren't necessarily having to do that holistic reading because you might as selective by definition and again that's not a judgment it's just simply looking at the numbers and whatnot of course 60,000 applications for 1600 seats or you know shrink the fraction you've got a much easier process out of you well first of all Roxanne thank you for the great question and I'm delighted to see you using chat gpt in that way and gentlemen both of you thank you for the this is this is a decision that seems to have just further and further ramifications the more we look into it we have another question or comment by our friend keel dumps who ask or states this the problems of both admissions and debt are mostly caused by higher as control credentialing elite degrees given preference and hiring alternative credentials could help solve this so what do you what do you think the use of alternative credentials how might that change things wow I think it's cool but which alternative credentialing outfit is going to compete I think it's great I suppose go back to Wayne and Garth in their garage and they probably had all sorts of funky credentials but who is going to respect them except you know the guy hiring at the local record store and I'm not being snarky there I think it's important in it it's a great question raised you look at higher red people have called it a bundling cartel with regard to credentials and whatnot does it need to be rethought sure who's going to do it but it does raise the question about whether or not especially in an age of social age and did access to so much in the way of digital resources will students or whatever young people decide there are alternative way pathways to education and employment but will employers accept that I don't know know good point I did so you know there's a long economics literature trying to distinguish between the degree to which education provides labor market benefits because it credentials people right the degree to which it provides labor market benefits because they learn something while they were in school right and at least my read of that literature is I think we have growing evidence that actually a lot of what's happening does really seem doesn't seem to be very well captured by things like the exams that we use to measure that learning which is to say the labor market return to alternative credentials has not yet been shown to be substantial that may be because employers don't understand them or maybe be because whatever the valuable thing is that happens inside of universities that transforms 18 year olds into adults isn't happening in these alternative credential programs but is that the value of I I a for your degree and especially a for your degree from a research university in the labor market appears really large and so at least impartial equilibrium given taking the labor market as it is is a lot of value and sort of thinking about how to best allocate that that higher education system to students who can most benefit from it so the sheepskin effect is still there it's what's at least the least we can say is that there are very large labor market returns to degrees though I'm not sure how large the sheepskin effect is per se if I can spoil it too please I'll feed in the horse but it suggests as well again what's the alternative credentialing I mean in some ways there's credentials and there's credentials and right now if you look at the applications processes and whatnot you know there's a cartel within the cartel because you read about the literature and the pressure I mean my kids went through this you know invited to apply you know and so forth and then you know here again what you know there are the elites who seem to be conveying one set of credentials and then there are the non-elites who are conveying solid credentials but they don't happen have the right name of the sheepskin so the alternative credentialing actually fits into just trying to build and expand upon you know whatever we want to call it the elite base of higher ed in the states and we have the resources for that but it's just you're trying to sell a non-elite school to an applicant who honestly believes he or she needs to go to an elite school how do you do that? and I'm not being sarcastic I'm just simply saying that's the nature of this game my kids went through it we had just several kids from where we live were invited to apply to one school actually there were two different ones they never were heard from again they got into actually better schools but clearly all they were you know they were invited to apply to jack up the rejection rate we you know we were joking the parents of those schools so the nature of the game what isn't is not an elite school plays into this as well no that's a that's a very good but keel you're you're steady focus on credentials is terrific and I'm really grateful for you to be doing that and I think Mark and Zach have given you some really interesting ways of developing that further thank you both we have more questions that are still coming in and George Station had a really really good point let me just bring this up on the stage so you can see it public universities have HR affirmative action plans and policies if they take federal funding so all of them do these plans disappear or do they stay pending a SCOTUS case about staff and faculty I'll flash that on the screen again so you can see it so HR affirmative action for hiring rather than admissions Mark I think you know the answer to this question you know we'll wait until see we'll wait and see what happens when the case comes along you know again this would suggest that this is problematic will be problematic it's you know again higher excuse me higher ed public schooling and so forth have always been sort of one sphere of this as opposed to employment being another so I don't know but you you're right I think the logic of the case would suggest then that affirmative action hiring now could come under the microscope as well so we might be back to to Zach's earlier point about this appearing in all kinds ways the whole ecosystem of higher ed and many states unless you can come up with the just an explanation you know I mean one good yeah I think I was about to say exactly what Mark is about to say so I'll make one point here which is that the the first set of peace Brian I lost Jack am I the only one no Zach I think you froze up can you refresh your screen just reload that in the chat folks that anybody else getting seeing Zach freeze up or make sure that's that's happening the system level Western can you can you think yeah looks like a connection a serious connection issue yeah Western's on it here I'm going to bring I'm going to bring Zach down right now so that we can take care of that the we have more questions that have come in and I'd love to hear more of the Zach's thought and we'll bring him back but I want to make sure that we get a chance for everybody asked her questions and so Mark this one's up to you now hope you're ready and this this is from Brooke Kyle who asked this decision is focused on admissions any insight into if financial aid leveraging models may be impacted if points are assigned for diversity as well as test scores GPA etc great question Brooke I suppose this would be after the fact once we've gotten once we have finished our process of admitting folks now presumably in a holistic virtually colorblind way you know is someone going to be snooping around to say aha but the money is being allocated differently I don't know where this will go because frankly if you look Gorsuch and Roberts both said well move money away from athletics and legacies towards you know lower income folks or whatever again Roberts left open won't be a problem again we'll have to see and in order to do this remember it's going to take somebody with the resources to go and get the evidence to make a case and work their way up to the Supreme Court so this even so this that questions probably several years away from us at least because that's a lot of resources and a lot of proof you've got to get through the court system and quite a process to to win through oh that's waiting can we touch upon just I want to I don't know if anybody wants to talk about it but the student loan decision to yes just just one second Brooke I I wanted to thank you for that excellent question and just note for everybody before we transition to the second decision that we're talking about again a very complex series of effects as a result of this decision that will play out in many ways and Mark's point about researching this as well enforcing it I think are especially important yes so the other decision Mark what's the name of the decision about financial this is a Biden in Nebraska okay so the Biden decision and that sounds weird to say the so the Biden decision basically clobbered the Biden administration's plan to forgive student loans scale using the heroes act and now the Biden administration's on to what they call plan B so what to what is this what is the Biden decision we do to my gosh just to higher education and to all the people who have people who are those call well I think you know this this is critical and in in teaching con lawyers or everybody do not read the news do not read the pundits go read the case what this case is about is actually has nothing to do with loans financial aid higher education or anything else that's everything to do with separation of powers and how much money excuse me online how much power and discretion do you want to give the executive branch the president and how despite what may or may not bear to have been Congress's intent and allocating power to them and the court has read this is saying well no what the heroes act said was okay was making modifications and what not two loans and what not but it did not give the secretary of education the authority to cancel loans that's a big jump and the court is saying this is going to be clear Congress gave you power a did not give you power be and so you can't claim power be okay well wait a look at this is simply to say okay fair enough um two responses if Congress wanted to give the president power be it could get up and rewrite a lot tomorrow it has that power this Congress isn't likely to do it it's so polarized that's another matter the other question that comes into play honestly as well if the president goes and does this under the ostracities of the heroes act and Congress doesn't do anything I complain can we not infer that Congress is saying this is okay that's a question that does pop up in criticism of the court when it renders such decisions but back to this closing quickly I see on the time Congress can do this tomorrow they can give the secretary of education the power to suspend or cancel loan payments they just have to say it clearly that's all this decision said if Congress says that secretary of education can do it so this doesn't say outlaw the idea of student non-forgiveness it's just said as the chief executive didn't have the power to do it this way and that Congress should really be the one to do it as they have the power of the purse right and to put it in partisan terms if you don't want President Trump to have had this power you can't give it to President Biden that's what this is about you fear the authoritarian the dictator and waiting whatever if you worry about the state of democracy you want this to be coming from the people through the elected representatives in Congress and the executive branch just can't expand its power so in this respect Congress can do this tomorrow it just has to get up and do it we should be quite a lift Zach you're back good to see you uh-oh very sorry about that it's a little hard with wife like a Wi-Fi problem that does not remember ah well that's that's that's that's always a problem I mean I just had a wonderful friend who is a podcast creator it is wonderful podcast music and just moved to another European location and the upload speed zero two I mean p.s. um so Zach I'm wondering do do you have any thoughts about the Biden decision about the admissions that you'd like to add I know you're focused on the first of action but I'm curious or yeah yeah on student debt actually to be honest do not have thoughts um it's Mark just described one way in which this is fundamentally not a decision about education there's another way in which this is fundamentally not a decision about education which is that it's it's it's retrospective it only impacts or almost only impacts students who were educated long ago uh and so had very little you know in very few ways changed the calculus for current students who are making choices about whether and where to go to college and and what to study uh and so for that reason it has a as an economist being through exactly those choices either on behalf of institutions or students this really wasn't a choice that sort of had very much for us to grab on to and there's a follow-up though too and for the audits this is important again to see you know you got to look and see who's writing the opinions what else is going on there was the companion case of this and I forget the name of it but it was two folks challenging the heroes act for not covering their loans and nine zip led by Alito the court said no you all don't know standing no one has to write a loan for giving this act that includes you too this can be a specified loan for giving this act oh interesting so it's very interesting in the sense that and this is getting no play whatsoever the court said the heroes act is fine you don't have standing you so because you don't like it the only problem here was simply and this is it constitutional democracy is all about this abide by the rules and separation of powers if you want to do this do it right please do it right um it's important to keep that in mind it just can't be interpreted beyond according to the court what seems to be its fair interpretation Congress is free to fix that so what what happens next I mean is that you mean you made the very very good point that this is not a case really about current students but about older students people who have already had some college experience some have degrees some dumb um what's the what's the next step I mean that's that's a whole you know tens of millions of people who are going to start some are going to default or try to default uh the New York Times helpfully remind us that death does clear the slate which uh I think sure absolutely nobody um what uh what happens next do we have to see if the Biden administration can try their plan be to try and pull this down a little bit or otherwise are we just in for a big slew of repayment yeah I'm not sure I have so much to add to exactly what you just said what happens next is and who don't have lower credit scores and I in some cases wage garnishment well I'm sorry to be right um you know my job here is to is to help facilitate the questions uh Doyle asks in in a a good question any thoughts of what plan B will be Doyle there's actually a page on the Department of Education site uh um it has three prongs to it as far as I recall um but please if if no one comes up with us in the chat in the next couple of minutes um email me and I'll give you a copy of it um let's let's circle back then um a bit more to the admissions question um I think we may be seeing a major blow to a lot of ambitious uh and talented black and Latino students who really want in the creme de la creme of American higher education as we rank that who want to get that seat at UT Austin or at Harvard um and it sounds like we'll be you know that population is going to then shift to other schools which may be as Mark pointed out to other schools that are equally excellent um and it may be that they shift somewhere else or perhaps see their career stymied um well as we scramble to try to try to think about this let's let's look out a few more years say you know four years you know the course of a theoretical undergrad degree uh where's some of the other impacts that we should be expecting uh what's going to happen to these students how are these where's some ways the university to go to respond yeah so actually I'm going to look at a little further than that and the sense that what happened over the 20 years after California banned affirmative action in 1998 and I think this is a sort of useful way of thinking about this take um uh people black and Hispanic workers in the state of California who are earning at least a hundred thousand dollars a year and are in their early 30s so like 15 years after the affirmative action ban is implemented because you can imagine like the first group of 31 to 35 year old none of whom had access to affirmative action in the state of California when they went to college say 15 years earlier so this has occurred in about 2014 2015 uh-huh and so you can just count out okay how many high-earning 35 35 five black and Hispanic professionals were there in the state of in uh 2014 2015 the answer is about 22,000 such individuals this is a big state there's a lot of high-earning black and Hispanic young professionals and then you can ask okay how many more would there have been if affirmative action had lasted so when these young professionals had applied to college they had had access to more selective universities because all of California's public universities still had active affirmative action programs and so that's estimable you can see how many successful young professionals there were who were coming out of universities a couple of years before affirmative action was banned you can see how many there were after and so it's pretty straightforward number to estimate and the answer is there would have been something like seven or 800 more black and Hispanic successful young professionals in 2014 2015 and there were actually so so we're talking about like 3% is the number of successful young black and Hispanic professionals who disappeared who ended up earning less than a hundred thousand dollars a year or who left the state of California because they didn't have access to the UC Irvine or the UC San Diego or the Santa Barbara or whatever it may have been because those schools affirmative action policies ended and grand scheme of things it's a relatively small number what this suggests is that there are a lot of ways of succeeding in America that don't run through elective universities and that most of these kids were still going to college many of them are going to this school they would have otherwise gone to as Mark said only some share of them ended up going to a less selective school than they had previously enrolled at and so what you see is like there is this net effect right the fact that university preferences ended had long run implications for these young black and Hispanic workers but it wasn't like a radical transformation of the California labor market it just meant that there were fewer successful black and Hispanic workers by about 3% than there would have been us. So if we if we just crudely multiply that number say roughly we're talking about say 30,000 black and Latino you know 18 year old to across the U.S which is which is a below and needs to be addressed but but but I have to stop there because it is 4 o'clock on the East Coast and we have ran through our hour the two of you gentlemen have given us a wonderful way of thinking about these really really challenging rulings you've you've covered everything from practical politics to constitutional law to how institutions work in the academic scale so much especially for doing this of the job of a hat Mark what's what's the best way for people to keep up with you and to you know follow you know what you're what you'll be doing email for now I've got to get a website up and running but you know I'm available I'd love to trade notes with anybody I can put my email in the chat please to please I don't I don't I need I would love to be you know one one percent of the blog I could actually email I'd love to trade notes and I don't JD you had a a great question up in the chat you might want to email Mark and and bounce idea off and Zach it's I seems like keeping up with you is like tracking an electron as a whirls around a nucleus what's what's the best way to keep up with you is your website so I'm easy to find on Twitter my websites available I write I have this new book out metrics that matter that I think has by Google will lead you excellent and we'll do that we'll do that for much and congratulations on your and your new situation and and thank you both very much but friends don't leave yet because we have we have to tell you about what's happening next on the forum but I do want to also ask you well I hope that this emergency session was helpful for you please let me know what you thought if you'd like us to do this for any similar situations or for any similar problems please let me know this was an experiment and you will will participate and you all very good now if you'd like to keep talking about this experiment but specifically about the Supreme Court decisions and their impact on higher education please turn to social media as you can just use the hashtag FTTE you can find me on Twitter as you can see here and you can find me and of course you can find my blog right there so please keep talking about this if you'd like to look into our previous sessions including ones where Zach was a guest and market participant as well we've talked about race and higher education as well as finance and higher education take a look at tidyurl.com slash FTF archive you can find them all there if you want to look ahead to our upcoming sessions on everything from AI and campus economics just going to forum the future of education that us and you can see it there and of course please thoughts about what I'm finding and forecasting about AI and education and once again thank you all for submitting a terrific range of questions it's great to think together with all of you I hope you're all well I hope the summer which is unbelievably hot this week I hope it treats you safely take care everyone and we'll see you next time including tomorrow online bye bye