Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Printing Expressions

Give Feedback

You can use the p command to print a variable’s value or the result of an expression. l will list 11 lines of code around our current line. If you continue entering that command, then you’ll see the next 11 lines of code. To reset the command, use l .

ll will show you just the local stack frame, usually the current function you’re stopped in. You’ll see more about stack frames in video 8 of this course.

Pressing Enter in a pdb prompt is the equivalent of entering the previously entered command. pp is short for pretty-print and will format the output of whatever we’re printing. This is especially useful for collections like dictionaries. q will quit out of the interactive debugger.

Pygator on Sept. 22, 2019

wouldn’t ll make more since as local list instead of long list in this context?

Austin Cepalia RP Team on Sept. 22, 2019

It would, but according to the documentation it stands for long list. That confused me too when I was researching for this course

Become a Member to join the conversation.