From the course: Advanced Python

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Documentation strings

Documentation strings - Python Tutorial

From the course: Advanced Python

Documentation strings

- [Instructor] In this chapter, we are going to learn about some of the language features that are specific to Python that can help you write better code. We're going to start off by learning a little bit about documentation strings. It's always a good idea to write documentation strings for your functions and classes and modules. And personally, I think this is one of the great features of Python. The documentation for your program's code is directly available as a part of the program itself. So let's take a look at an example. So here in VS Code, I'm going to open up the terminal. And let's maximize this. Alright, so what I'm going to do is fire up the Python Interpreter, and I'm going to do that by typing python3. If you're doing this on your own computer and you're on Windows, you might just need to type py or just the word Python. If you're on a Mac or Linux, you'll probably need to type python3 It depends on how you install Python. Here in the codespace, I'm going to type…

Contents