Hi everyone. In this tutorial, we're going to talk about that, how to count characters, words and lines from a file in Python language. In this example, I'm going to use a file from this path. File name is cities in UK. In this file, we have 20 cities in UK. I think they are ranked by population. I'm going to resize this window. And I'm going to copy this path. And I will use this file. We're going to read all cities from this file. And we're going to count the number of words, lines and characters. So first, we need to open a file. I'm going to copy this path. And we're going to use file cities in UK. We want to read from this file. So we're going to have a mode, which stands for reading. This open function is going to return file object. We want to keep this file object in a variable. We're going to call it in file. Now I want to read all characters from this file. And I'm going to store all characters from this file in a variable. I'm going to call that variable data. And I'm going to read all info from this file. So we're going to say in file.read with this function. We're going to read all cities from this file. In this variable, we have all cities from our file. And then we're just going to count characters, words and lines from this file, which are currently stored in data variable. First, we want to find number of characters. We're going to call length method with data argument inside it. And this method is going to return the number of characters inside this data variable. Then we want to find number of words. And we're going to call again length function. And we want to split all this data with spaces and new lines. And let's count the number of lines. We're going to use again function length. And we want to split lines of our data. So in this last pression, we're going to split our data by lines. And then we're just going to count these lines. Let's just print number of characters, number of words and number of lines. So this file has 189 characters, 23 words and 20 lines. That's all in this lesson. Thanks for watching. Don't forget to subscribe to my channel. See you in the next video. Bye, everyone.


Today we are going to discuss the esophagus, stomach, and alimentary tract. My name is Dr. Sanjay Sanyal, from his department chair. The structure that we see here is the thoracic part of the esophagus. The thoracic part of the esophagus extends from T1 to T10. The esophagus is in the posterior medial stymium and in this portion, the esophagus does not have any serosa. Therefore, here it is very prone to rupture and perforation, especially during foreign body removal by esophagoscopy, in which condition it can produce a very dangerous condition called medial stenitis. The esophagus is located just anterior to the azygous vein, thoracic duct, and it is located to the right of the thoracic aorta. As it descends down, it moves to the left, and it goes slightly anterior to the thoracic aorta. So this is about the thoracic part of the esophagus. It extends through the esophageal hiatus, which is at the level of T10, and after that it becomes the abdominal esophagus, and the abdominal portion of the esophagus is only half an inch long. It extends from T10 to T11 with a slight leftward tilt. Now we have shifted to the abdominal section, and my finger has gone into the esophageal hiatus, which is at the level of T10, and this opening is in the right crust of the diaphragm, which you can see here. So this small segment is the abdominal segment of the esophagus. The difference between this segment and the thoracic segment is that it is covered by visceral peritoneum, namely the cirrhosa, so therefore it gets a slight protection. And here I have made a small incision to show you that anterior vagus nerve is visible here, and this is the anterior vagus, which I have lifted up here, and likewise behind is the posterior vagus, which we cannot see. This is the external appearance of the gastroesophageal junction, and after that is the stomach. This is the cardio of the stomach. This is the cardial notch, the angle between the esophagus and the fundus of the stomach. This is the fundus of the stomach, which is in relation to the left home of the diaphragm. This is the greater curvature of the stomach, and this is the lesser curvature of the stomach. In the lesser curvature, this is called the incisura angularis, and this is the most dependent part of the lesser curvature. This portion of the stomach is the corpus of the body of the stomach, and it stops at the line drawn from the incisura angularis to the greater curvature, and after that this portion is the pyloric anterum, and after that is the pylorus, and then it goes to the diodenum. The diodenum has got four parts. This is the superior part, or D1. It is at the level of L1. Now this has got two subparts. The first inch of the first part is the intraperitoneal part, and it is within this structure here. This is the hepatodeodontal ligament, which has been removed, but the contents of the hepatodeodontal ligament are in place. So the portion opposite to that is the first inch of the first part. This is the part which is most known to diodenal ulcer. Then we have the remaining part of the superior part of the diodenum, that is at the level of L1. Then we have the descending part, which is from L1 to L3, and then we have the horizontal part, which is at the level of L3. And finally we have the fourth part, the D4, which goes from L3 to L2, before it merges with the diodenum. So these are the parts of the diodenum. This was the relationship of the hepatodeodontal ligament. My finger has gone into this space here. This is the epiploic foramen, or the foramen of Winslow.  The structures behind my hand are the posterior boundary of the foramen of Winslow, and they are composed of the inferior vena keva and the right supra-real gland. The structure above my finger is the liver, and the structure below my finger is the first inch of the first part of the diodenum. So these are the boundaries of the epiploic foramen, or the omental foramen of Winslow. And now my finger has gone into this space here. This space was covered by the lesser omentum, part of which has been preserved here. It was covered like this. So this has been reflected, and this space is the omental bursa or the lesser sac, which extends not only behind the lesser omentum, but it also goes behind the stomach. And these structures that we see here, these are all the structures in the bed of the stomach. We see the pancreas, left kidney, left supra-real, left dome of diaphragm, splinic vessels, which are running on the upper border of the pancreas and behind the pancreas. And of course the transverse mesocolon, which we cannot see here. These are the structures which form the bed of the stomach, which allows the stomach to move when it mixes the food. Coming to the relations of the diodenum. This is the descending part of the diodenum, which is in front of the left kidney and the left supra-real. Coming to the horizontal part of the diodenum, we can see that it is crossed by superior mesentric artery and the superior mesentric vein. This is a place where the diodenum can potentially get compressed by the superior mesentric artery. And finally, this is the fourth part of the diodenum, d4, and this is the jigenum. And my finger is located, this is the dj flexure. Extending from the dj flexure, going behind the pancreas, will be the suspensory ligament of diodenum, also known as the ligament of trites. And just by the side of the dj flexure, we see a diperitoneal depression. This is called the paradeodinal fossa. And this is a potential site of internal herniation. And when we are trying to remove a trapped loop of intestine from here, we may have difficulty because running in the free margin of the paradeodinal fossa, we have a very important vein. And this vein is the inferior mesentric vein. Now I'm going to open out all these intestinal contents. We will show the interior. Now we have opened up the abdominal part of the esophagus. And this is where I had showed you the fibres of the anterior vagus. When we look at the mucosal pattern here, we cannot see very clearly in the cadaver, but in a living specimen, we will be able to see a wavy line, which is called the z-line. And that z-line marks the junction between the stratified squamous epithelium of these of vagus and the cholerna epithelium of the stomach. But in this case, in the cadaver, we may not be able to see it. These folds of the gastric mucosa, called the gastric rugae, this is to increase the surface area. And when I put my finger in, my finger has gone into the fundus of the stomach here. This gastric rugae occupies the fundus and the body of the stomach. And as we keep going, we will open out the entire stomach and you can see the gastric rugae here. If we were to look along the lesser curvature of the stomach, we notice that the gastric rugae are linear, parallel, and more regular in nature. That portion of the interior of the stomach is called the gastric canal. Or in German it is called the magenstrasse. This is the root by which liquids go directly into the diurnum. Now we come to the region of the pyloric entrum and the pylorus. And this is the region of the pylorus, where the sphincter is located. And if you look at the cut margins, you will notice that the muscle is very thick here. Especially thick at this portion here and this portion here. So this is the region of the pyloric entrum, and this is the region of the pyloric sphincter. And this is the true pyloric sphincter, which controls gastric emptying. And after that, we come to the first part of the diurnum that is D1. This part of diurnum, again, the mucosal pattern is very closely similar to the stomach. That is, it is longitudinal and linear. But as we go further down, we notice that the mucosal pattern has changed. The mucosal pattern in the subsequent part of the diurnum is transverse. So this is the descending part of the diurnum. And here I would like to draw your attention to a very important structure. And that is this one where my probe has gone in. This is major diurnal papilla, which is the opening of the main hepato-pandemic duct of Virso. In this region, if you look closely, you will find that there is a specific arrangement of the mucosa. Just above the hepato-diurnal papilla, we have a fold of mucosa above that. And this is called the mucosal hood. And below that is a longitudinal fold of mucosa. This is an important landmark for the endoscopist when he wants to calculate the hepato-pandemic ampulla. And by using this landmark, he locates the position of the major diurnal papilla. So this is also the junction between the foregut and the midgut. So these are the structures which we see in the interior of the diurnal. Thank you very much for watching, ladies and gentlemen. Dr. Sanjeev Sanyal signing out. If you have any questions or comments, put them in the comment section below. Thank you for watching. Like this video and subscribe.


Felly, rwy'n credu o'r holl段ol yw y gwaith yng ngyfredig, mae'n gweithio'n lle sock o'r gweithio. Mae'n bedwy'n credu'r lle sgrifetyddiaeth mwy o ddiweddol, ond rydyn ni'n credu'r pari a gyrraedd yma, a fyddai'n gweithio'n cerddo'r cyhoedd yn perthynu i dda i fewn. Mae'n gweithio o'r candwch yn y gweithio'n gweithio'n gwunio. I won't tell you what it is yet, but stick around. And the reason I'm not announced to give away in the title of the video is a simple one. I don't like the idea of giveaways, mainly because I haven't got a great deal to give away, and secondly because I don't like people subscribing and commenting on videos just to win something. I want people, I want to, if I want to give a prize away, I want it to someone who is loyal to this channel, watches the channel on a frequent basis, and hopefully if you tune into this video you will be one of those people. So that's the idea behind it and I'll tell you what the prize is very, very shortly. But what I'm going to do is just want to... It's going to be a bit of a thank you. Thank you to everybody who supports the channel and mainly you who are watching right now.  I can't believe what has happened, where I've been. Things have changed and it looks as though it's going to be an unbelievable 2020 and the ideas ever when I do these videos, it's not to gloat, it's just to show what has happened and what can happen and it's all down to you people who watch. And it started off almost, well I started doing this nearly four years ago but a year ago today I met up with an old mate of mine and had been in Australia for a couple of years. PGA professional Lewis Johnson, Lou, as most of you will know him, came and joined the channel and made his guest appearances as we went along there. We'll start off by skipping back, like I said, a year ago and we went up to our very first trip up to East Lothian and Lewis started off with some immortal words. Yes, I am walking through the streets with me Trolley, with special guest new to the channel. Lewis Johnson, say hello Lewis. Hi, are you okay? Hi, are you okay? What a great screen debut. Right, so day one has come to an end. It's a walk back that I spoke to you on earlier on in the night. Maybe a little bit struggling in terms of my vocabulary right now. A few more planks down, Lewis. Feeling good? Fabulous. Feeling absolutely fabulous. What a place, not bad. Well, considering we're on December, I don't know what the date is, is it the 7th? Freshers of Daisy in a T-shirt. I said it's December the 7th. Freshers of Daisy in a T-shirt. No, it's still December the 6th then. It's still December the 6th. Quarter to 11. Quarter to 3 in the morning it is. Quarter to 3 in the morning, we're just staggering in. We've had a really late night and 24 pounds I had. Do you have? Yeah, 23 at least. I don't even know if that was only code, you know. Right, so day one comes to an end. We've just finished it a long night. What time is it, Luke? No, at least one in the morning mate. It's about half 10. Yeah, it was a strong start from Lewis, but he soon got into it. And no sooner, I think it was February, we were on a plane and we were off to Abu Dhabi. Again, all these things sort of, they roll and blur into one, but Abu Dhabi, along with James Robinson, who had never met at that time, we had a great few days there. Well, I don't know, it's five, six, seven days, I can't remember. And I had a real bit of time there, and I had a lot of time there. Six, seven days, I can't remember. And I had a real good laugh. And again, it was definitely a theme when me and Lewis went out on a trip. We definitely had a bit of a laugh along the way, and here's some clips from our trip to Abu Dhabi, and we'll start off with a bit of Gazelle camp. Okay, so this is the morning of what is my day three, and it's Abu Dhabi Golf Club. It's like playing golf with David Attenborough. Blue Planet Live. It's out of that beach. I'm here. What do you add into the Gazelle, Anne? He was still here. We're Australian. Beautiful vibe. It's a bit of a... I'm not singing that bit. I want a result where something... I need a birdie, mate, to get a result here. Oh, my word. Oh, my word. Pick that ball flight up. Oh, Louis. My God is that. You need to see how it happens. We're loving that. I'm happy for you. I will zoom in on it, but just give me a sec. Right, okay, hang on. Let's see if we can get... Well, Lou, I think that's probably the best three where I've ever seen you, mate. That's it. Get me on a plane. I'm coming home. There's nothing better than that. That really was one of the best shots I've ever witnessed, I can tell you. It was an awesome shot, and it's so good. We normally get... Well, if anyone hits a great shot, it can often be that it's not caught on camera, so it was nice that on that occasion it was, and like I said, one of the best shots I've ever seen is. And to do it on 18, with that clubhouse in the backdrop, it was fantastic for Louis, but I also enjoyed that bit. From there, where did we go? Well, I went back to a place that has become somewhere really close to my heart, and it's in Slovenia, Royal Bled Golf Course, and I had a trip back there. I'd already been there once and lucky enough to do that. I went back with my wafer again. We had an unbelievable few days, and to be playing golf in these kind of venues from four years ago to what had happened in this last 12 months really goes to show, just like I said, how far the channel has come and the opportunities that I've got, and again, thanks to you people, and it was incredible over there in Slovenia. And then from there, they just kept on coming, and I'm only mentioning briefly again, this is an overview of what happened. I did a lot more than just what I'm showing in here, but from there, me and Lewis, we went up to Scotland again, and I went on numerous occasions during the year, but I'll pick up on some of the more memorable times. I went and played where was the home of the Scottish Open this year, which was Renaissance Club, Private Members Club up in Scotland, back in my favourite haunt of East Lothian, and we got to play golf on, well, the course was literally two weeks away from being to host the Scottish Open, and we got a little bit of a round over there, and that again was incredible. It really was. Here's a quick look at our time up at Renaissance. Right, we've just arrived at Renaissance, and we're not going to find out what is behind those gates just yet. I'm going to have to press this but nothing. Right, now before we go any further, I think you've had to endure it long enough to listen to me, like I said, go back home over a year. I've had that, I don't know if that's right or wrong, but anyway, the prize, the bit, that like I said, I don't get a great deal in terms of the stuff. I've just not, I don't know whether people ask for them from manufacturers to give away and maybe that's what I'll have to start to do. But what I'm going to give away is my old set of irons, and it may be not the greatest prize in the world I don't know, but for those of you who don't know, I used to game, I've got a bit of a mixed set of P790s, the older version, the initial version of P790s in four, five, six iron, and then from seven down to wedge, I played the P770s. It's a blended set, like I said, they're going to be the shaft that I had, which I think is the dynamic gold S300s. So again, mine suits anybody. They're in decency enough, Nick. I'm going to throw in a tailor-made carry bag as well, which again is one of mine, and that is in good, Nick, I think. Can you give away second hand prize? I don't know, but anyway, to me, it's a decent set of irons. It's the best I've got, to be honest with you, and I may be throwing some balls at whatever else, but the prize is simple. All you have to do is be a subscriber, comment on this video, and hit that like button as well on this video. And again, you can comment as many times as you wish, and that will up the chances of you, because I'll just do a draw throughout the comments. That's how it will work. I'll scroll through the comments and we'll pick out a winner. So the more times you comment, the more chances you've got to win. And ultimately, the more comments you get, the better it helps me in terms of promoting this video. So it's kind of like that's the idea, but it's just a real massive thank you, like I said. I don't know if it's the best prize, but like I said, it's half decent. But I hope it comes, like I said, from someone. There's a lot of people who support this channel. Every video they watch, they comment, they interact, and it means a great deal. And like I said, none of this would be possible without any of that. So that's going to be the prize, and I'll carry on with where I am at. So Scottish Open, we then got on the boat and we went over to Ireland for the Open, which was at Royal Port Rush, which was fantastic. And again, on real few days that we had there, it was loose that came over, we had some half decent weather, mixed with some bad weather, and a quick look at our trip to Port Rush. We are in Ireland mate. In Ireland for the first time. How do you feel to be in Ireland? Oh lovely. I mean Ireland that's 23 degrees is not a breath of wind. So basically it's your fault though really. What iron did you use? Five. Five? What iron did you tell me to use? Cheers bud. So there's mine. I put myself to perfection. Hit a great shot, run down off here, and then listens and takes advice. Henry, bit of beef there. Molonari. Molonari been the gym mate, he's looking a bit to any older tight skint off there. You got one of them, me and you. It wouldn't be the first thing I bought from the Merch Stents. I'll mention down below. Do you want to see me and Louie in skint sight? Get under this. Mate, I'd prefer to get soaked. I'd prefer to get soaked.  Bit miserable today if you open, I'm not the best way to start. I thought this goes off a little bit between now and some people, otherwise it won't be a great watch on the television. And it's not going to be too good for spectators either. It was sticking fast after Paul Rush. We'd put on a competition to find the average golf for 2019, the first event that we looked to put on. We found our first winner, it was held and hosted at Conway Golf Club. I'll speak more about Conway a bit later on, but our first winner was Owen Corry. It was unreal, again, people came from literally all over this country and other countries to come and play. We had 120 people to take part. It was a fantastic day and I think it's fair to say everybody had a great time and I know I certainly was quite proud to get 120 people to come from wherever and get involved. So it was a fantastic day and again, more to come on that in 2020 where we're going to host the next one. What came next, I need a glance down. We went again and I hope it's not getting too boring, but like I said for me, it's like, this will all happen in one year. I went and tried a week, again, Lewis again, we went and tried hickory clubs for the first time and we went back up to East Lothian, visited Jack White, we got kitted out with our clubs and went out and played Kill's Spindy, which is very traditional, it was a course that was built for hickory clubs in terms of its length and we went and played out on there and again it was a fantastic few days, it really was.  It'll be me safe. He was really hitting the brandy air driver 325 yards to the green. It's a great start. LLU, LLU, LLU. I didn't know that. Good. Good. Two family right there. Okay, that's ok. LLU, first, have you had hickory clubs before? Never, no. Yn ystod, mae'r t-shirt ydych chi'n gyd yna ar y peir o'r rhan ar gyfer, byddwn i'r ystod. Felly mae'n ystod eich gwneud i'r cyfrifiadau. Yn ystod y lle, mae'r cyfrifiadau, mynd i'n gwneud i'r ystod. Rwyf wedi gwneud i'r ystod, mae'r ddechrau'n hyn. Mae'r gofynig yma. Rwyf wedi'u gofyn i'r cyfrifiadau a'r cyfrifiadau i America. Mae'r cyfrifiadau sydd wedi'u gofyn i'r Scottsdale yn Arauson. Mae gweithio mewn gwirionedd, fe wedi bod yn cael y ffilm, ac mae gennym ddod oherwydd ei hollodd ei hollodd. Rwy'n ddinwedig yn gweithio chi. Ac rydyn ni'n rwy'n gwneud … Mae'r gweithio a'r gweithio. A'r ddych chi'n ei have to see iddyn nhw, ac byddwn ni'n gweithio ar yw, mae'n lle lle'r gwneud. Roedda'r yddydd, Llyfrgell. Roedda'r yddydd. Roedda'r yddydd. Roedda'r yddydd. Roedda'r yddydd.  Felly roedd yn gweithio'r hiallu o'r hyn ac i gael'r golf yn y mwyaf. Ond Gary ddim yn rhoi unrhyw ymddangos i ddim yn ei ddweud a gweithio'n gwaith. Mae'n ddiddordeb i'w ddweud i'r amser a'r ddweud i'u ddweud i ddweud o'r pwysigol yma. Rwy'n gwneud. Mae'r gwybod i'n ddechrau sy'n ddweud. Fel yma, dyma'n gwneud rwy'n ddweud. Rwy'n ddweud? Yna. Rwy'n ddweud. Felly, mae'n gweithio hynny yn cael Andy. Felly, mae ydych chi? Felly, rwy'n credu ni'n gweithio y gwaith. Felly rwy'n credu i'r adref golfa. Ar y cyfnod ni'n bod, Bob Parsons. Fy fydd angen am y bydd y gwaith y cyfnod pa'r gwaith i'r ddechrau dweud i'r golffaith PXG i'w ffêrydd. Yn ddweud, mae'n fwy gydag i'r gwaith i Andy. Fy fydd bob Parsons, rwy'n gwaith i'r gwaith i'r desai yn y PXG, i'w fideo'r a'r newydd, a'r hollwch ar ôl y ffordd ymddangos o'r proses fel gwaith, a'r hollwch ar y cyfnod o'r cyfnod, ac yn fwy o'r helydd o'r hollwch ar y hollwch ar y hollwch. Felly, rwy'n gwybod, rwy'n gweithio, sy'n gwybod, sy'n gweithio ar Scottstead, rwy'n gweithio ar Farchffordd ac yn fflaid am yndwer yn ymweld. Rwy'n gweithio cyfnod o'r hollwch ar gyfer y cyfnod, ac rwy'n gweithio ar gyfer y cyfnod. felly, gallwn dwi'n fwy os iddiernes dyna, a bottlewch fel yw gilydd arall, rhywb yn gwneud chi wedi wneud i mi oherwydd y gwasanaeth yr hyn i'n gwerth ei wnebu, rhaid i fynd am ymgyrch yn fideo, ac rhaid i hynny eisiau unig o'r 4 yr nhw ddych chi, ond i'n gwneud ei gwirio.  Ac rwy'n cael ei fod yn y PXD yn ystod o gynhau hynny. Rwy'n gyddaeth eich bod yn allan yn ymwneud o wasiol. Mae fawr yw'r gŵr yn ymddiad. Rwy'n gydag i chi'n gwybod fel gynnig. Mae'r gynnig o wneud o bobl, oherwydd o'n gwybod. Mae'n gwybod o'r gynnig o'r gynnig. Mae'n gwybod o'r gynnig, ac mae'n gwybod yma. Mae'n gwybod o'r gynnig. Mae'n gwybod o'r gynnig o'i gwybod hefyd. i hoffi'r tranfer sy'n gynnwys nid yn gwneud yn cael amnod o'i rhan o'r canfs, a byw ddim yn ei wneud yn cael ei chyeilion i'r eu bod yn ymhell ar i'r ddefnyddio yma o'i rhan o'i cymdeithas arall i'r dda, fan i'r dda, yn ymhell o gyffredinol, boi chi'n dechrau, fel nid oedd ei fod yn ei bobl yn armor o ran, a hufod am wneud fel hwnnw o'i gweithio. Mae'r griffle ychydig, i'w wedi gweithio'r gwirionedd i'w datblygu. yw'n gwneud eich ysbkydd yna, fel rhaid i'w yn y cyfnod, yna'n gyfnod yn ymgyrch yn sio, felly rhaid i'w meddwl, a'n meddwl i'n meddwl i'n creu, di'n meddwl i'n meddwl i'n meddwl wedi'i'n ein gwithio. Rhaid i ymlaen wneud am ddiwedd, dwi'n meddwl eich ddim yn ddoi, mae'n meddwl yn y rhai gyfnod a odi, bod oedd yna mewn gwirionedd rhaid iddo, rhaid i'n meddwl i ddim yn ddechrau, Felly, dyna'n gwneud i'r rhanion i'r Rodd Wailer. Felly, ei clywed arwain. Fyddwch yn y cyflodd newydd. Felly, rydyn ni'n gwneud y pryd. Felly, rydyn ni'n gwneud i'r rhanion i'r rhanion i'r rhanion i'r rhanion i'r Rodd Wailer.