Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

FABIAN TRUJILLO
FABIAN TRUJILLO
878 Points

use of print(_)

i saw Craig use this in the video but im not sure what its used for can someone please explain.

Steven Parker
Steven Parker
229,744 Points

If you mean the underscore passed as an argument, we may need to see the context. Can you post a link to the video page and give a time index?

FABIAN TRUJILLO
FABIAN TRUJILLO
878 Points

Steven Parker yes https://teamtreehouse.com/library/strings-and-operators time index 2:35 he uses print(_) if you could please explain its use to me that would be wonderful. Thank you!

1 Answer

Steven Parker
Steven Parker
229,744 Points

Python automatically stores the value of the last expression evaluated by the interpreter into a particular variable named "_" (underscore). You can print it, or assign its value to another variable if you want.

FABIAN TRUJILLO
FABIAN TRUJILLO
878 Points

Thank you so much for clearing that up makes sense and wrote it down in my notes.