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

Python Python Collections (2016, retired 2019) Lists Creating lists

zheshuozhang
PLUS
zheshuozhang
Courses Plus Student 820 Points

what is the final output looks like?

what is the final output looks like?

lists.py
name1 = "this is me"
name2 = "this is me too"
name4 = "3"
name3 = "1, 2," + name4
my_list = "{}, {},".format(name1, name2) + name3
print(my_list)
Jason Mollerup
Jason Mollerup
2,683 Points

this is me, this is me too, 1, 2, 3

1 Answer

Hey {} is a placeholder for the format function. In this question, it is calling name1 and name2 into the formatting function and then adding the var name3 to the end. The result should be as follows:

this is me, this is me too. 1, 2, 3