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)
![Mauro Y.](https://uploads.teamtreehouse.com/production/profile-photos/1703082/micro_eu.png)
Mauro Y.
6,520 PointsCan I get input direct from the system shell? Like: " python script.py 2 "?
To use this value as argument for a function. Is this possible?
2 Answers
![Anson Tio](https://secure.gravatar.com/avatar/668e39d256dcc39656a392c251a96dc4?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Anson Tio
5,448 PointsYes you can.
# First of all, you need to import sys
import sys
# To get all of the arguments list, you can use sys.argv
print("Number of arguments %d" % len(sys.argv))
print("Args : %s" % str(sys.argv))
Hope this example helps :D
![Mauro Y.](https://uploads.teamtreehouse.com/production/profile-photos/1703082/micro_eu.png)
Mauro Y.
6,520 PointsCool! This is just I wanted. Thanks!