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)
![samratdevkota6](https://secure.gravatar.com/avatar/dfa13b9086d4ef11237b6749177a75be?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
samratdevkota6
Python Development Techdegree Student 616 Pointsmy solution
verb = input("Please enter a verb ")
noun = input("Please enter a noun ")
adjective = input("Please enter a adjective ")
print("I enjoy practice! I find it helps me to " + verb + " better.")
print("Without practice, my " + noun + " would probably not even work.")
print("My code is getting more " + adjective + " every single day!")
the instructor used "," but I used "+" what's the actual difference?
5 Answers
![Courage Ngonidzaishe Moyosvi](https://uploads.teamtreehouse.com/production/profile-photos/11520085/micro_15840492787261300181503.jpg)
Courage Ngonidzaishe Moyosvi
28,998 Pointsusually we coders tend to write code the way we first learnt it and so how you write your code will depend on who tough you your first code and in what way did he/she put it across to you. So all the formats are ok use the one you find convenient
print("HAPPY CODING FOLKS!")
![Sean Coutinho](https://uploads.teamtreehouse.com/production/profile-photos/11513079/micro_me.jpg)
Sean Coutinho
7,788 PointsWhich one is best practice and why?
The best option would probably depend on the programmer and what he's normally used to using but as for me, I find using the placeholders({}) quiet easy to use and to understand. Especially when I need to revisit my code and check where I've used my variables and how I used them. I shun option 1 of concatenating strings and variables as using '+' comes with chances of making mistakes when placing the quotes and the '+' sign. Another quiet handy way of using variables in a print statement is to use f-strings. You get to use placeholders and not need to use the .format() method!
Example:
name = 'Tree'
surname = 'house'
print(f'{name}{house}.')
name = "Tom"
age = 14
print(f"My name is {name}. I'm {age} years old.")
![samratdevkota6](https://secure.gravatar.com/avatar/dfa13b9086d4ef11237b6749177a75be?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
samratdevkota6
Python Development Techdegree Student 616 PointsWhich one is best practice and why?
print("I enjoy practice! I find it helps me to " + verb + " better.")
print("Without practice, my " + noun + " would probably not even work.")
print("My code is getting more " + adjective + " every single day!")
OR
print("I enjoy practice! I find it helps me to", verb, "better.")
print("Without practice, my", noun, "would probably not even work.")
print("My code is getting more", adjective, "every single day!")
OR
print("I enjoy practice! I find it helps me to {} better.".format(verb))
print("Without practice, my {} would probably not even work.".format(noun))
print("My code is getting more {} every single day!".format(adjective))
![Tsering Choedhen](https://secure.gravatar.com/avatar/68c38d37698b88d48d04f2dffefb58dd?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Tsering Choedhen
1,051 PointsI am so happy to do it myself. I wanted to show my result here but i do not know how to paste my code in here. I am really enjoying this. Its like learning a new language but using basic english language.
![Ams BM](https://secure.gravatar.com/avatar/778b8e4f4454532cc01fc68c810e443a?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ams BM
5,898 PointsMy solution using f string
verb_input = input("Please enter a verb: ")
noun_input = input("Please enter a noun: ")
adjective_input = input("Please enter a adjective: ")
str_one = f"I enjoy practice! I find it helps me to {verb_input} better."
str_two = f"Without practice, my {noun_input} would probably not even work"
str_three = f"My code is getting more {adjective_input} every single day!"
print(str_one)
print(str_two)
print(str_three)
I can just simply place the f sting inside the print() function.
print(f"I enjoy practice! I find it helps me to {verb_input} better.")
print(f"Without practice, my {noun_input} would probably not even work")
print(f"My code is getting more {adjective_input} every single day!")