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)
![Carter Pringle](https://uploads.teamtreehouse.com/production/profile-photos/3052752/micro_profile.jpg)
Carter Pringle
3,416 PointsIF / ELIF statement
So as we check new_item to see if it matches DONE, SHOW, or HELP, I've been doing it as shown below.
if new_item.upper() == "DONE":
break
elif new_item.upper() == "HELP":
show_help()
continue
elif new_item.upper() == "SHOW":
show_list()
continue
Is there any downside to this, or is it just personal flavour? My reasoning behind it is if they do it lower case or in weird casing, but does this open me up to bugs further down the road? I've tested it by adding things like: 'TV SHOW' and 'well done roast beef' and it seems fine.
-Carter
1 Answer
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsMaking command words case-insensitive is a common practice, and a nice enhancement to the project.
Jerry Kankelborg
4,885 PointsJerry Kankelborg
4,885 Pointsi would add the upper() method to the input() to avoid bugs in the future, like so :
new_item = input("> enter command: ").upper() if new_item == 'DONE': break