You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
317 B
18 lines
317 B
6 months ago
|
def Person_new(name, age, eyes):
|
||
|
person = {
|
||
|
"name": name,
|
||
|
"age": age,
|
||
|
"eyes": eyes,
|
||
|
}
|
||
|
|
||
|
def talk(words):
|
||
|
print(f"I am {person['name']} and {words}")
|
||
|
|
||
|
person['talk'] = talk
|
||
|
|
||
|
return person
|
||
|
|
||
|
becky = Person_new("Becky", 39, "green")
|
||
|
|
||
|
becky['talk']("I am talking here!")
|