130k views
2 votes
Write the code that will create a dictionary (myInfo) with the following Keys and Values: (python)

Write the code that will create a dictionary (myInfo) with the following Keys and-example-1

1 Answer

3 votes

Answer:

Here's the code to create a dictionary myInfo with the specified keys and values in Python:

python

myInfo = {'One': 1, 'Two': 2, 'Three': 3, 'Four': 4}

You can print the dictionary using the print() function:

scss

print(myInfo)

This will output:

python

{'One': 1, 'Two': 2, 'Three': 3, 'Four': 4}

User Justin K
by
9.2k points