Pythonicness and Packaging
The coolest thing I learned as part of the the Pythonicness and Packaging module on SoloLearn was a concept called "tuple unpacking." When I learned about unpacking tuples I wanted to write some code that would allow me to unpack a list of emails that I hypothetically scraped from a file.
Email Unpacking Code:
count = 0
for i in emails:
email = i
count += 1
strgcount = str(count)
word = "Email # " + strgcount + " is: "
print(word + email)
Score
10/10
No comments:
Post a Comment