I am a novice with Python. I am trying to output a first initial last name for an email address. Such as:
John Doe jdoe@domain.com
I am using the following Python:
primary_mail = '%(givenname)s'[0:1]%(surname)s@%(domain)s
But when it outputs I don't get:
jdoe@domain.com
Instead I get some jumbled thing:
params = { "givenname":"Hans", "surname":"Wurst", "domain":"fleischer" }
print "'%(givenname)s'[0:1]%(surname)s@%(domain)s" % params
Can someone help me? I don't understand Python 100% yet so sorry if this is very novice.