I am wanting to use str.format() with the variable randomOne, since %s doesn't seem to be working for me:
print('The number generated between %s and %s is' + number) % (randomOne, randomTwo)
And I get this error:
TypeError: unsupported operand type(s) for %: 'nonetype' and 'tuple'

str.formatdoesn't use%splaceholders, it uses{}placeholders. Second, you're not actually callingstr.format, you're using the%operator. And finally, you're using the operator on the result ofprint-ing the string, rather than on the string you wanted to print. @sweeneyrod's answer fixes all three (in two different ways, depending on whether you actually wantedstr.formatas you said, or%as your code showed).