LoslegenKostenlos loslegen

Calling by its name

You have created your database with the tools and the different Data Science subfields they are used in. The company is considering creating courses using these tools and sending personalized emails to the users recommending the different topics. They have asked you to make this process more time-efficient. To do this, you want to create a template email with a standard message changing the different tools and corresponding field name.

First, you want to try doing this with just one example as a proof of concept. You use positional formatting and named placeholders to call the variables in a dictionary.

The variable courses containing one tool and one field name has been saved. You can use print(courses) to view the variable in the IPython Shell.

Diese Übung ist Teil des Kurses

Regular Expressions in Python

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Create a dictionary
plan = {
  		____: ____[____],
        ____: ____[____]
        }
Code bearbeiten und ausführen