First time here? Check out the FAQ!

Ask Your Question
0

global variables

asked 13 years ago

anonymous user

Anonymous

updated 13 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 13 years ago

kcrisman gravatar image

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

Preview: (hide)
link

Comments

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

kcrisman gravatar imagekcrisman ( 13 years ago )

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: 13 years ago

Seen: 3,096 times

Last updated: Apr 04 '12