Global keyword in Python | Modify a Global Variable | Python Tutorials for Beginners #lec79

preview_player
Показать описание
In this lecture we will learn:
- What is Global keyword?
- Why do we use global keyword in Python?
- Global scope vs Global keyword
- How to modify a Global variable from within a function?

*********************************************

Connect & Contact Me:

*******************************************

More Playlists:

#global #keywords #python #pythonforbeginners #jennyslectures
Рекомендации по теме
Комментарии
Автор

Ma'am thankyou for the wonderful lecture : )

*input*
name="Jenny's"
def display():
global name
name=name+" Lectures"
print(name)
display()
print(name)

*output*
Jenny's
Jenny's Lectures

aishwaryagandhi
Автор

Output:
Jenny's
Jenny's Lectures

muneebbolo
Автор

name="jenny"
def display():
global name
name=name+" is my soul"
print(name)
display()
print(name)
o/P : jenny is my soul
jenny is my soul

manisha_ff
Автор

Mam suggest from which chapter we need to learn as a begineer

b.harshavardhan
Автор

Mam, we can modify that global value. Without a global keyword, , but we hv to modify directly in the print function.
Well, is this also fine know mam?

vivekacharyavivekacharya
Автор

Jenney's
Jenney's Lectures 😊

sumanthlucky
Автор

from where do you learn the things. please tell us the source.

shankar
Автор

mam i am not getting how value of a after calling became 20

neha__singh
Автор

for 1 jenny's lectures
2.jenny's

___saicharanreddy.k
Автор

first print("jenny")
second print("jennyLecture") we updated global variable inside the funtion display()

solamankj
Автор

ma'am, your explanation is vey beautiful and clear as like you

penakasammaiah
Автор

Mam, Can you please provide notes for each lecture as you provided in the beginning of the series .

Thanks for the series .

VishnuVardhan-dphu
Автор

def display():
global name
name = name + "lectures"
Print(name)
display()
print(name)


Output-
Jenny's
Jenny'slecture

reasonalphysicsexplain
Автор

Please explain last 5 min concept 20, 20, 30 with diagram mam.

ramya_koppisetti
Автор

Python, anaconda whatever you teach I'll learn them happily although i have no use of them in my profession

i_UCHHA
Автор

name = "jeni"
def display():
global name
name = name + "lecture"
# print("inside:", name)
print(name)
display()
print("outside:", name)

output :
jeni
jenilecture

azarudeena
Автор

Mam please kya aap java language pada sakte he kya

premkamble
Автор

Kali me ma maal, safed me bawal;
Aapki thodi si muskuraht kar deti hai mere Dil ka bura hal;😅

tengerbmw
Автор

The way she stares directly on camera
It takes our attention away.
Please don't do that 🙏😂

preetamsthings
Автор

Jenny madam pl pl pl pl pp start SQL. Hath jodkar bimti hai apase

vaibhavpatharkar