Python standard library: Joining strings

preview_player
Показать описание


Subscribe to this channel, as I try to go through all of the Python standard library!
Рекомендации по теме
Комментарии
Автор

I had help, but this was really helpful making an e-mail address out of finger data and thought I'd share it...


finger = "givenname surname, one, two, three, other"
".".join(finger.split(", ")[0].split(" "))
emailpart = ".".join(finger.split(", ")[0].split(" "))
print(emailpart)


It takes all the parts of your video and shows how to deal with string items that are not consistent, like the full_name field in finger.

WeedMIC
welcome to shbcf.ru