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 Functions and Looping While Loops

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 68,423 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