-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyvariable.py
More file actions
53 lines (38 loc) Β· 1009 Bytes
/
pyvariable.py
File metadata and controls
53 lines (38 loc) Β· 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#Variables containing string
name = "Python Monthy"
quest = "Scripting"
activity = "Scraping"
#To check the type of the Variables
print("name is a string",type(name))
print("quest is a string",type(quest))
print("activity is a string",type(activity))
#Variables containing numbers, integer
age = 100
year = 2026
print(age)
print(year)
#To check the type of the Variables
print("age is an int",type(age))
print("year is an int",type(year))
#variable contiaing number, float
pi = 3.14
temp = 98.6
print(pi)
print(temp)
#To check the type of the Variables
print("pi is a float",type(pi))
print("temp is a float",type(temp))
satisfied = False
single = True
print(satisfied)
print(single)
#To check the type of the Variables
print("satisfied is a boolean",type(satisfied))
print("single is a boolean",type(single))
#Declaring list variable in python
items = list() # this is a list
items = [] # this is also a list
print(type(items))
#Declaring list variable in python
dic = dict()
print(type(dic))