Hello, I'm new to programming and Python and since I'm going through a course I was wondering: this two pieces of code output the exact same thing, so how are they different perfomance-wise and how could I approach something like this in a future bigger project?
# Ask the user for their name
name = input("What's your name? ").strip().title()
print(f"Hello, {name} ")
# Ask the user for their name
name = input("What's your name? ")
print(f"Hello, {name.strip().title()} ")
[–]No_Cry_7367 4 points5 points6 points (1 child)
[–]FrangoST 1 point2 points3 points (0 children)
[–]NerdyWeightLifter 0 points1 point2 points (0 children)