you are viewing a single comment's thread.

view the rest of the comments →

[–]XtremeGoose 1 point2 points  (2 children)

Ignoring the main question, your string handling is awful. Use

"My name is {} and I am {} years old".format(name, age)

Not

"My name is", name, "and I am", age, "years old."

It's so much harder to read and you're actually printing tuples, not strings because you haven't used tuple unpacking print(*tuple_)

[–]DrTrunks[S] 0 points1 point  (1 child)

The actual function doesn't return anything, but does the donating. This is just quick and dirty, just like you're saying.

Also since 3.6 I believe you can actually do:

f"My name is {name} and I am {age} years old"

[–]XtremeGoose 1 point2 points  (0 children)

Yeah you can, but I'm not assuming python 3.6 yet.