From the course: Python for JavaScript Developers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Porting the greeting - Python Tutorial
From the course: Python for JavaScript Developers
Challenge: Porting the greeting
(upbeat music) - [Instructor] Knowing Python, as well as Java script, will help you make informed decisions about where logic belongs in your application stack. It might prove beneficial to practice porting code through these challenges. So here we are in 03_05.js and right off the bat in line one, you'll see that we defined a list of objects called friends. And these objects have a key of name and a value of a string. And keep in mind that if you port these into Python dictionaries, you would have to use a string for the key. I make a note of that in line two in a comment. Now for extra credit, you can also try to figure out why I chose these names. It has to do with the history of Python. Then on line eight, I iterate through these friends' names and check to see if a lowercase a is in it. And if there's a lowercase a, I console log and interpolated string with the friend's name. So take a few minutes and try…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.