Kevin Tiller

Generation

code to explanationSat, 22 Apr 2023

words = 'His e-mail is q-lar@freecodecamp.org' pieces = words.split() parts = pieces[3].split('-') n = parts[1]

Here, we first split the last word by hyphen, then we split the first part by the '@' character, and finally we access the first part of the result of that split and assign it to n.

Want to kickstart your project?Use the new AI Studio to create your code