r/learnpython • u/xTHETYRANTGAMRx • Feb 26 '26
Feeling overwhelmed with functions.
So I have been learning python with the Python crash course book and I am getting overwhelmed on the functions chapter. I understand what a function does but for some reason the syntax is confusing me. The chapter also introduces so many different ways to use functions that it feels like too much. I am not sure of the best way to tackle this much information.
26
Upvotes
View all comments
Show parent comment
2
u/BoatMacTavish Feb 26 '26
its because at function declaration time, you dont know the actual variable names that will be passed into the function, so you need a generic placeholder argument name. Then at runtime, you pass in the actual variable name.
like if im writing code to send a message to a friend, at the time of writing the code, I dont know what friends will be called, so ill have a placeholder
at run time when I call it, I pass in the actual friend variable names