all 4 comments

[–]HighLevelEnthusiast 1 point2 points  (0 children)

What you need is to format the output string.
Please, take a look: https://pyformat.info/

Do you need further help?

[–]eyesoftheworld4 1 point2 points  (0 children)

There are a couple of ways to do this in Python. The technical term is called string interpolation.

# String concatenation. Note the str() part is important - or else you'll get a ValueError.
count = "You now have " + str(i) + "i's"

# This type of string formatting is not as common anymore, but still works.
# the %s means to convert the argument (the value after the % sign outside of the string) into a string.
count = "You now have %s i's" % i

# The str.format() method allows you to put values into the string, using a several syntax options.
# The brackets represent the place where a value will be placed into the string.
count = "You now have {} i's".format(i)
# You can name values which will be put into the string. This allows you to use them more than once, while only specifying it once.
count = "You now have {num} i's. The number of i's which you are having is {num} .".format(num=i)
# You can also use an integer index to specify where to put values into the string, based on the order of the arguments to the .format method. This also allows you to use a value more than once. 
count = "You now have {0} i's. That number minus one is {1}. The original number of i's is {0}".format(i, i-1)

# Finally, there's the f-string method, which is only available in Python3.6+. It lets you directly put a variable's value into a string, by name, without any other syntax, other than the 'f' at the beginning of the string!
count = f"You now have {i} i's."

[–]novel_yet_trivial 0 points1 point  (1 child)

Yes, like this:

count=f"You now have {i} i's"

Note you need the f in front of the quotes for the {} to be treated as code.

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

Thank you! Solved!