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)
![brokemotivation](https://secure.gravatar.com/avatar/b7771044dccc996112b8e8ceb1a672db?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
brokemotivation
Python Development Techdegree Student 1,982 PointsWhy this code shows error??
I fully understand the code, I understand what this code is doing and I even gave the right answer, but I just wanted to try it on my own. I don't know why I'm getting a TypeError even when pasting the exact code. Can someone help me with this please? I'll be highly obliged! Thanks in advance!! Here's the Error: TypeError: argument of type 'builtin_function_or_method' is not iterable
![brokemotivation](https://secure.gravatar.com/avatar/b7771044dccc996112b8e8ceb1a672db?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
brokemotivation
Python Development Techdegree Student 1,982 Pointsall_restaurants = [
"Taco City",
"Burgertown",
"Tacovilla",
"Hotdog station",
"House of tacos",
]
def tacos_only(restaurants):
taco_joints = restaurants.copy()
for taco_joint in taco_joints.copy():
if "taco" not in taco_joint.lower:
taco_joints.remove(taco_joint)
return taco_joints
dinner_options = tacos_only(all_restaurants)
print(dinner_options)
1 Answer
![brokemotivation](https://secure.gravatar.com/avatar/b7771044dccc996112b8e8ceb1a672db?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
brokemotivation
Python Development Techdegree Student 1,982 PointsI think, I found my mistake. But thank you for your help. You made me to go through the code once again and I found that I typed .lower instead of lower(). Thank you so much, You did my help anyways!😂️
boi
14,242 Pointsboi
14,242 PointsI tried this, and it gives me no error. Can you paste your code here? I need to see your code.