-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1st.py
More file actions
53 lines (52 loc) · 855 Bytes
/
1st.py
File metadata and controls
53 lines (52 loc) · 855 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
#print("Hello")
# a = 7
# b = 4
# print(a,"//",b,"=",a//b)
#print(a,"+",b,"=",a+b)
#print(a,"-",b,"=",a-b)
#print(a,"*",b,"=",a*b)
#print(a,"/",b,"=",a/b)
#x='hello'
#x=x+' there '
#print(x)
#understanding substrings and methods
#s = '12345'
#print (s[3])
#print (s[-2])
#print (s[1:3])
#list modifyng content
"""x = [1,2,3]
y = x
z =x.append(12)
print (z)
print(y)
x =x+[9,10]
print(x)
print(y)"""
# x = [1,2,3]
# print(x[1:])
# y = (2,)
# print(y)
# d = {1:'hello','two':42,'blah':[1,2,3]}
# print(d)
# print(d['two'])
# d = {1:'hello','two':42,'blah':[1,2,3]}
# print(d)
# d['two']=99
# print(d)
# d[7]='new entry'
# print(d)
#to delete in the dictinories
# d = {1:'hello',2:'there',10:'world'}
# del(d[10])
# print(d)
#copying dictinories and lists
# d = {1:10}
# d2 =d.copy()
# d[1]=22
# print(d)
# print(d2)
# a=6
# b=5
# c=4
# print((a+b+c)//3)