Save this code in the file mymodule.py
person1 = {
“name”: “John”,
“age”: 36,
“country”: “Norway”
}
—
import mymodule
a = mymodule.person1[“age”]
print(a)
Save this code in the file mymodule.py
person1 = {
“name”: “John”,
“age”: 36,
“country”: “Norway”
}
—
import mymodule
a = mymodule.person1[“age”]
print(a)