Isn't it easier to understand, if you write it like that?
Isn't it easier to do it like so?
def print_statements(): # Printing lines of code: # [print(x) for x in ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]] data = ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."] list(map(print, data))
- def print_statements():
- # Printing lines of code:
[print(x) for x in ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]]- # [print(x) for x in ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]]
- data = ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]
- list(map(print, data))