Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
You first turned your string into a tuple, which means that both 'letters' were stored in a tuple separately. Then you used str on the tuple, which creates a string representation of the tuple. And that looks like when you're printing a tuple. If you want to 'reconnect' your string, you have to use: my_string = ''.join(tuple(your_string)) This 'glues together' the separate letters, without any space. You can enter something in the quotation marks, then that string will ne glued in between).
11th Dec 2019, 12:23 PM
HonFu
HonFu - avatar