Open andrewhk-nm opened 6 years ago
Here are some experiments on how to accomplish this.
>>> '{pri} text is best!'.format('my')
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
'{pri} text is best!'.format('my')
KeyError: 'pri'
>>> '{pri} text is best!'.format({'pri': 'my'})
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
'{pri} text is best!'.format({'pri': 'my'})
KeyError: 'pri'
>>> '{pri} text is best!'.format(pri='my')
'my text is best!'
>>> '{Primary Account Holder} text is best!'.format(Primary='my')
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
'{Primary Account Holder} text is best!'.format(Primary='my')
KeyError: 'Primary Account Holder'
>>> '{Primary Account Holder} text is best!'.format(Primary Account Holder='my')
SyntaxError: invalid syntax
>>> '{Primary Account Holder} text is best!'.format(Primary_Account_Holder='my')
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
'{Primary Account Holder} text is best!'.format(Primary_Account_Holder='my')
KeyError: 'Primary Account Holder'
>>> '{PrimaryAccountHolder} text is best!'.format(PrimaryAccountHolder='my')
'my text is best!'
>>> 'any text is best!'.format(PrimaryAccountHolder='my')
'any text is best!'
>>> '{} any text is best!'.format(PrimaryAccountHolder='my')
Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
'{} any text is best!'.format(PrimaryAccountHolder='my')
IndexError: tuple index out of range
TODO: 2018-04-27 9.57a Perhaps some sort of way to put the person's name in the text? I don't want to start there though.