File tree 2 files changed +40
-0
lines changed
2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ fruits = ['mango' , 'x' , 'watermelon' ]
2
+
3
+ for fruit in fruits :
4
+ print (fruit )
Original file line number Diff line number Diff line change
1
+ # a = input("your name?")
2
+ # print(3)
3
+
4
+
5
+ person = {"name" :"ajay" , "age" :30 ,"subject" :"python" }
6
+
7
+ city = dict (name = "jaipur" ,pin = 302017 )
8
+ print (city )
9
+
10
+
11
+ person ["hometown" ] = city
12
+
13
+ for p in person :
14
+ print (p )
15
+
16
+
17
+ for (prop ,value ) in person .items ():
18
+ print (prop ,value )
19
+
20
+ for i in range (1 ,10 ,2 ):
21
+ print (i )
22
+
23
+ person ["name" ] = "abc"
24
+ print (person )
25
+ print (person ["age" ])
26
+ person [
"email" ]
= "[email protected] "
27
+ print (person )
28
+
29
+ person2 = person
30
+ person2 ["name" ]= "zyx"
31
+ print (person )
32
+ print ("----------------------" )
33
+ print (person ["hometown" ]["pin" ])
34
+ person ["hometown" ]["pin" ] = 302016
35
+ person ["phones" ] = ["1" ,"2" ]
36
+ print (person ["phones" ][1 ])
You can’t perform that action at this time.
0 commit comments