This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here's a dictionary literal with data and behavior in one line of code | |
baby1 = { | |
"first_function": lambda x: x + 1, | |
"first_words": "Zoiby want to buy on margin" | |
} | |
# Here's a much more complicated OOP solution in 5 lines | |
class Baby: | |
def __init__(self, first_function, first_words): | |
""" |