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 Python Basics (2015) Python for Beginners Call a function

Kyle Grove
Kyle Grove
271 Points

how to use the print function

I want to write a simple string "Hello Treehouse"

function.py
Print = ("Hello, Treehouse")

1 Answer

andren
andren
28,558 Points

When you want to call a function you don't use the = operator. You just type the name of the function and then a pair of parenthesis. Then type in the data you want to send to the function within the parenthesis.

Also Python is case-sensitive, meaning that Print and print are not considered to be the same word. So you have to make sure to type the function name in lower case.

Like this:

print("Hello, Treehouse")
Kyle Grove
Kyle Grove
271 Points

Thanks for your help Andren!!