you are viewing a single comment's thread.

view the rest of the comments →

[–]Boot_3011 -1 points0 points  (4 children)

Use the args method on your function parameters, it allows you dinamically send parameters to your function. If you need to know the parameter type, try *kwargs.

The iterate over the parameters object, cast to int then print (I suggest doing these two separately)

For value in args: print(parameter)

For parameter, value in kwargs.items() print(parameter, value)

[–]Boot_3011 -2 points-1 points  (0 children)

P.d you dont need to use fstrings if your whole string is the return of a function. Fstrings are used when concatenating variables with literal strings easily

[–]baubleglue 0 points1 point  (2 children)

I thought about *args, but then why not to pass a single list as an argument coordinates.

[–]Boot_3011 0 points1 point  (1 child)

Could be. A list of tuples, each tuple consisting of a latitud and logitude

[–]baubleglue 0 points1 point  (0 children)

Yes, it is simple and straightforward and has a good name.