RoadRomeo Posted March 4, 2021 Report Posted March 4, 2021 print "Hello World!\n" def f(): global s print(s) s = "allah is good " print(s) s = "local diety is great!" f() print(s) Quote
jajjanaka_jandri Posted March 4, 2021 Report Posted March 4, 2021 1 hour ago, RoadRomeo said: print "Hello World!\n" def f(): global s print(s) s = "allah is good " print(s) s = "local diety is great!" f() print(s) your output: local diety is great! allah is good local diety is great! Quote
ZoomNaidu Posted March 4, 2021 Report Posted March 4, 2021 1 hour ago, RoadRomeo said: print "Hello World!\n" def f(): global s print(s) s = "allah is good " print(s) s = "local diety is great!" f() print(s) Add exception too: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.