used format string in a different way.
def where_were_you_when_codewars_died(activity='codewarz', location='127.0.0.1', food_source='coffee'): db = Connection() record = "I was at {0} consuming {1} when {2} died.".format(location, food_source, activity) return db.add_record(record)
- def where_were_you_when_codewars_died(activity='codewarz', location='127.0.0.1', food_source='coffee'):
- db = Connection()
record = f"I was at {location} consuming {food_source} when {activity} died."- record = "I was at {0} consuming {1} when {2} died.".format(location, food_source, activity)
- return db.add_record(record)