<jupyter_start><jupyter_text><jupyter_code>print('Hello')
#@title Default title text
"""The global Keyword
Normally, when you create a variable inside a function, that variable is local, and can only be used inside that function.

To create a global variable inside a function, you can use the global keyword"""
x,y,z=1,3,2
print(x,y,z)
x=y=z='Orange'
print(x,y,z)   
### Output Variables
x='awesome'
print('Python is '+x)
###If you try to combine a string and a number, Python will give you an error:
x,y=5,'Hello'
#print(x+y)
###Global Variables  Global variables can be used by everyone, both inside of functions and outside.
x='Hello' # Global Variable
def hello():
    print('Python '+x)
hello()
####### If you create a variable with the same name inside a function, this variable will be local, and can only 
#be used inside the function. The global variable with the same name will remain as it was, global and with the original value.
x='World Tour'
def myfunc():
    x='Fantastic'
    print('Hello ' +x)
myfunc()

print('Hello ' +x)

'''The global Keyword
Normally, when you create a variable inside a function, that variable is local, 
and can only be used inside that function.
To create a global variable inside a function, you can use the global keyword.
If you use the global keyword, the variable belongs to the global scope:'''

def myfunc():
  global x
  x='Global Warming'
  print(' Hot Topics now a days ' +x)

myfunc()

print('Outside the function  ' +x)
x='awesome'
def myfunc():
  global x
  x='Fantastic'
myfunc()
print('Python is ' +x)
txt='Hello world' # return the string any whitespanceat the begining or the end
x=txt.strip()

print(x)
'''Python has the following data types built-in by default, 
in these categories:

Text Type:	str
Numeric Types:	int, float, complex
Sequence Types:	list, tuple, range
Mapping Type:	dict
Set Types:	set, frozenset
Boolean Type:	bool
Binary Types:	bytes, bytearray, memoryview'''

x=True; print(type(x))
x=b'Hello'
print(type(x))
x=memoryview(bytes(5))
print(x)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10910862152946907, 'fraction_numerical': 0.0024354603019970775, 'mean_word_length': 5.005847953216374, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '323247', 'license': 'Unlicense', 'n_tokens_mistral': 656, 'n_tokens_neox': 642, 'n_words': 286, 'path': 'w3schools.ipynb', 'repo_name': 'Byashsingh/python_Data_Program', 'size': '2053'}