Bummer! That workshop has been retired.

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

Can you make a string from other strings in python?

I am making a little calculator but my python is malfunctioning and i would like to know.

2 Answers

Yes, you can.

A = "aaaaaa"
B = "bbbbbb"
C = A + B
print C

OUTPUT aaaaaabbbbbb

You could also do printf and use {} with the variable A, or B or even C.

If you post the code it will be much easier to see but the answer is yes you can it's concatenate or maybe I spelled it wrong but you get the idea.

If it's a calculator are you sure it's strings out of strings or string out of numbers and strings?

Thanks