I've got a two letter word that I'd like to attach to a double digit number. The word is an integer and the number is a string. Say the name of the number is "number" and the name of the word is "word". How would you make it print both of them together without spaces. When I try it right now it still has a space between them regardless of what I try. Thanks !
3 Answers
In python 3 the preferred way to construct strings is by using format
To print out a word and a number joined together you would use:
print("{}{}".format(word, number))