Jun-23-2019, 02:38 PM
height = input('What is your height, {}? '.format(name)) # 56 characters height = input(f'What is your height, {name}? ') # 48 characters height = input('What is your height ' + name + ' ') # 52 charactersf-strings are the easy way. Note that adding another variable to this would add 2 characters plus the variable name to the format and f-string techniques, and 8 characters (4 spaces, 2 plusses, 2 quotes) to the addition technique. So in general, format will be easier than addition as well. And depending on implementation, addition can be less efficient.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures