Skip to main content

Posts

Showing posts from August 28, 2022

PYTHON

P YTHON TUTORIAL CORE PYTHON Python Data Types Python Operators Python Lists Python Tuples Python Sets Python Dictionaries Python If..Else, While & For Loops Python Function Python Lambda Python Class/Objects & Inheritance Python Iterators Python Scope Python ModulesNote: Python Json Python Try...Excep Python String Formatting PYTHON FI LE HANDLING Python File Handling, Create-Write-Read-Remove Files PYTHON MYSQL Python MySQL Create Database & Table Python MySQL Insert Python MySQL Select Python MySQL Where Python MySQL Order By Python MySQL Delete Python MySQL Drop Table Python MySQL Update Python MySQL Limit Python MySQL Join PYTHON MONGODB Python MongoDB Python MongoDB Create Database & Collection Python MongoDB Insert Python MongoDB Find Python MongoDB Query Python MongoDB Sort Python MongoD

PYTHON DATA TYPE

D ATA TYPE x = 5 y = 10 print(x + y) 15 x = "normal variable" print(x) normal variable def myfunc(): global x x = "Global variable" myfunc() print("After running fun " , x) After running fun Global variable fruits = ("apple", "banana", "cherry", "strawberry", "raspberry") a = (green, *yellow, red) = fruits print(type(a)," = ", a) <class 'tuple'> = ('apple', 'banana', 'cherry', 'strawberry', 'raspberry') print(type(green)," = ", green) <class 'str'> = apple print(type(yellow)," = ", yellow) <class 'list'> = ['banana', 'cherry', 'strawberry'] print(type(red)," = ", red) <class 'str'> = raspberry print(type(fruits)," = ", fruits) <class 'tuple'> = ('apple'