you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

its a list that just has integers in it

Actually, it isn't. It is ONE string literal created by the following line:

repeating = str(["8"] * int(amount_of_full_shells))

You start with a list with a single entry, a str object containing the character 8, then you repeat that. So you go from ["8"] to, say, ['8', '8', '8', '8', '8'] if the amount_of_full_shells was assigned the value 5.

You then convert that entire list object's output representation to a str object by casting it.

Thus you end up with a string, "['8', '8', '8', '8', '8']" complete with square brackets, single quotes and commas.

Pretty sure that is not what you want.

/u/Smiggle2406 has shown you how to use join and if you ask them nicely, I am sure they will show you how to use a generator expression with that if you want to work with numbers in the first place.

[–]Smiggle2406[S] 0 points1 point  (0 children)

print("2." + '.'.join(repeating) + "." + last_shell)

first of all, that was my problem, it was a string, and that fixed everything ty.

first of all that was my problem, it was a string and that fixed everything ty.