Ask Your Question
0

global variables

asked 2012-04-04 01:37:24 -0600

anonymous user

Anonymous

updated 2012-04-04 15:28:40 -0600

If I have a global variable N, how can i set N = smth inside of defined function?

def foo()
  N = 10

doesn't change global N, because Sage makes N local variable.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-04-04 07:23:26 -0600

kcrisman gravatar image

Does any online documentation about Python global variables help? Here is a typical stackoverflow question about them...

edit flag offensive delete link more

Comments

Not that you should necessarily make global variables in this way...

kcrisman gravatar imagekcrisman ( 2012-04-04 07:23:41 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-04-04 01:37:24 -0600

Seen: 1,001 times

Last updated: Apr 04 '12