Local and Global Variables — Data Science Journey 3#

Local Variables:

Local variables are defined inside a function and its scope is limited to that function only.

Can not be accessed anywhere outside the function.

Local variables are initialized inside a function and belong only to that particular function.

Photo by Kyle Glenn on Unsplash

Global Variables:

Global variables are accessible throughout the program and inside every function.Global variables are those which are not defined inside any function and have a global scope.

LET’S CODE

XOXO Sevval Hatice OTER. 💌

--

--

Sevval Hatice ÖTER

YTÜ Matematik | YET-GEN 2021–1 Trainee && 2021–3 LİDER| |https://linktr.ee/sevvalhaticeoter