Blog Introductions

In this  blog contains tutorials about  HTML Tutorials, Python Tutorials, CSS Tutorials, How to, PHP Tutorials, Java Tutorials, C++ Tutorials, Tutorials,  Examples, Source code,Learning,
Tips and Software development  services. Python Variables and its types |  Python tutorials Bestitworriors



Python Variables and its types



Python tutorials



Python Variables and its types |  Python tutorials Bestitworriors - Variables are the containers for storing data and information in itself that have different type of informations in it..Python support many types of variable like integer , float , string ,character etc.Python variables are case sensitive.Python variable name can't start with number.Python variable must start with letter or underscore character.Python variables name are case sensetive




Some Key Points of Python Variables




  1. Variable use to hold data and information
  2. Variable name must start with letter or underscore character
  3. Variable name can't start with number
  4. Variable name can only contain alpha numaric characer a-z ,1-9 and _character.
  5. Variabe name are case sensetive (name or NAME) are two different variable
  6. Global variable are those decleare outside the function globally but can be use inside of function
  7. Camel case variable first word letter is small other first letter large e.g myCamelCaseVariable
  8. Pacal case variable all words first caracter is capital eg. MyPascalCaseVariable
  9. Snake case variable all words merge with underscore character eg.my_snake_case_variable




Code




var1 = 5
var2 = "Best IT worriors"
print(var1)
print(var2)

x = str(3) # x will be '3'
y = int(3) # y will be 3
z = float(3) # z will be 3.0

#Variable Types

var3 = 5
var4 = "John"
print(type(var3))
print(type(var4))


#Both are different variables
com = 4
COM = "Sally"
print(com)
print(COM)


#Camel Case
myCamelCase = "Best It Worrior"


#Pascal Case
MyPascalCase = "Best It worrior"

#Snake Case
my_snake_case = "Best It worrior"




var5, var6, var7 = "Best", "IT", "Worrior"
print(var5)
print(var6)
print(var7)

#One Value to Multiple Variables
var8 = var9 = var10 = "Best of Luck"
print(var8)
print(var9)
print(var10)


#Output Variables


var11 = "Best It Worrior"
var12 = "is"
var13 = "awesome"
print(var11, var12, var13)


var14 = "Awesome Platform"

def MyFunction ():
print("Bestitworrior is " + var14)

MyFunction()





OutPut





5
Best IT worriors
int
str
4
Sally
Best
IT
Worrior
Best of Luck
Best of Luck
Best of Luck
Best It Worrior is awesome
Bestitworrior is Awesome Platform






I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the Programing project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back about Python Variables and its types |  Python tutorials Bestitworriors