 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can use single line if statement in Python. Before starting, you can note my information. You can subscribe my YouTube channel by clicking on the icon which is available on my video. You can download my app Tagmiz that is available on Google Play. Now coming on to the topic for demonstration, I am using a variable where whose value is 100. Now I am applying if condition that is where W equals to 100, then colon sign. Just after the colon sign, I can implement a statement and I am mentioning true inside it. Friends, if you have single statement with if, then you can have single line if statement in Python like I have implemented right now. Here I am implementing a general statement which is not connected with if. Here if condition is true, that's why true will be printed as output and this by will be printed always. Now I am saving this code. This code is saved inside D drive. Inside D, I have a folder practice. Inside practice folder, this is saved in test1.py file. Py is the extension of Python. Now I am opening command prompt. First I have to move into D drive, then inside practice folder. Now I can type Python space test1.py and I am pressing enter key. You can see the output. It is showing true and by because if condition is true, that's why it is printing true and by is not connected with if. That's why it is printing. Now I am changing value of where variable and it is 200. Again, I am executing the script. You can see only by is printed right now because if condition is false. Friends, if you want to implement single line if statement in Python, then you can do as I have demonstrated you. You can also implement this in your system so that you can understand this concept well. You can subscribe my YouTube channel. If you want to watch programming related video, you can see an icon is available on my video. You can click on that icon to subscribe my YouTube channel. You can download my app Techimage that is available on Google Play. Thank you for watching this video.