jeudi 21 juillet 2016

Python pass a variable's value, not reference to a function [duplicate]

This question already has an answer here:

Can't imagine this hasn't been asked before, but couldn't find this question anywhere, so let me know if you find it somewhere else!

I want to pass a variable to a function as a parameter by its value, not its reference, so that if the variable is later changed, the function will still call the initial value passed to it. Thanks!

Aucun commentaire:

Enregistrer un commentaire