-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (30 loc) · 663 Bytes
/
main.py
File metadata and controls
41 lines (30 loc) · 663 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
"""
Testing the Comments in Python
"""
a="TechArkit"
b="Python"
string_c="TechArkit python training"
print(string_c.count("i"))
## Replacement String
y=string_c.replace("training","course")
print(y)
#Array/List
a=[10,20,30,40,50]
print(a)
a.insert(2,80)
print(a)
b=[1,"i","hello",20]
print(b)
print(b[2],b[1])
print(b.index(1))
print("hi"+' '+b[2]+' '+"How Are You")
print("the position of hello in variable b is "+str(b.index("hello")))
#Tuple - Once created not be modified
a=(1,2,3,7,3,5)
print(a.count(1))
#Dictionary {}
dict1={1:"Hi",2:"Hello",3:"Welcome"}
print(dict1.get(0))
print(dict1.get("Welcome"))
print(dict1.keys())
print(dict1.values())