Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics Functions and Looping While Loops

Zahkyi Ferguson
Zahkyi Ferguson
504 Points

Are keywords & statements the same thing?

Are keywords and statements the same? If not what is the difference?

2 Answers

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 67,987 Points

Hey Zahkyi Ferguson, good question. I’m assuming you mean the built-in keywords and not keyword assignments.

A statement will often begin with a keyword, such as, for, while, break, import. A statement might also be a call to a built-in function, such as, print.

So, a keyword will be a part of or often begin a statement.

Post back if you need more help. Good luck!!!

Basically a statement is any sentence in python, while the keywords are preloaded(so to speak) words in python which have a specific meaning and function within the language and when attempted to use in a different way, might cause the program to crash( like using the word "class" ) as they might create a specific object in python