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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![sathish](https://secure.gravatar.com/avatar/dd51732a0f9546f8be38a72757f40845?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
sathish
5,697 Pointswhat is the use of command python -i? why we use this ? thank you in advance
what is the use of command python -i? why we use this ? what is interactive mode? what does it mean? thank you in advance
3 Answers
![Balazs Peak](https://uploads.teamtreehouse.com/production/profile-photos/8369872/micro_merc.jpg)
Balazs Peak
46,160 PointsThis enables you to run python as a REPL, i.e. read–eval–print loop.
What is REPL?
It's a common feature of programming language compilers, which enables developers to type code in a CLI fashion, and getting back the value immidiately, to which their code was evaluated. This does not serve production level software development, it is for experimenting with language syntax and testing single-line code snippets, most of the time.
Example:
- If I give 5, to the REPL, it immidiately prints out 5, because that's what 5 evaluates into.
- If I give len([4, 5, 6]) to the repl, it prints out 3, because I gave a list containing 3 items given into the "len" function, which returns its length, which is 3
![sathish](https://secure.gravatar.com/avatar/dd51732a0f9546f8be38a72757f40845?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
sathish
5,697 Pointsthank you very much Balazs Pukli
![cesarmatta](https://uploads.teamtreehouse.com/production/profile-photos/4755812/micro_0.jpg)
cesarmatta
11,592 Pointsthanks you Balazs
cesarmatta
11,592 Pointscesarmatta
11,592 PointsSo it means that is some kind of way to "test" the code without altering it ?
Balazs Peak
46,160 PointsBalazs Peak
46,160 Pointsyes. You can check what a certain expression evaluates to, or what a function call returns.
Erkindjon Pulatov
1,118 PointsErkindjon Pulatov
1,118 PointsGreat answer! You are awesome!