python 2.7 - Why is '5' passed into warriors_game when it is called instead of 'win' -


why '5' in line 4 passed warriors_game when called instead of 'win'? shouldn't python pass argument argv1 last thing assigned (which 'win')?

def warriors_game(*args):      arg1, arg2, arg3 =  args         arg1 = 5       print "if warriors %s i'll happy." % arg1     print "if warriors %s i'll sad." % arg2     print "just kidding, don't care %s, %s, or %s." % (arg1, arg2, arg3)  warriors_game('win', 'lose', 'draw') # why doesn't pass 'win'  


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -