Ask Your Question
0

global variables

asked 2012-04-04 08:37:24 +0100

anonymous user

Anonymous

updated 2012-04-04 22:28:40 +0100

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 14:23:26 +0100

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 14:23:41 +0100 )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 08:37:24 +0100

Seen: 2,929 times

Last updated: Apr 04 '12