I had a bunch of email addresses that was set in a specific format that I can strip characters from, to build up a Username, Name and Surname from the Email Address, that I could use to for dynamic reporting.
Using Split in Python
Here I will define the value of
emailadress to a string, then using Python’s
split() function to get the values that I want:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Print The Values in Question:
Now that we have define our keys, let’s print the values:
From here on you can build up for example an email function that you can pass the values to your function to get a specific job done.
Update: Capitalize from One String
Today, I had to capitalize the name and surname that was linked to one variable:
1 2 3 4