Skip to content

Commit 7beadff

Browse files
author
hussienalrubaye
committed
Dictionary
1 parent 06c2b28 commit 7beadff

File tree

4 files changed

+178
-25
lines changed

4 files changed

+178
-25
lines changed

.idea/workspace.xml

+120-25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dictionary.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
4+
5+
def main():
6+
#Student={'Name':"hussein alrubaye",'Age':27,'Slary':232.5};
7+
Student=dict(Name="hussein alrubaye",Age=27,Slary=232.5);
8+
Student['Name']="Hussein Ahmed"
9+
Student["Dept"]="software engineer"
10+
print(Student,type(Student))
11+
del Student["Dept"]
12+
print(Student,type(Student))
13+
print(Student['Name'])
14+
print(Student['Age'])
15+
Student.clear()
16+
print(Student,type(Student))
17+
18+
19+
20+
if __name__ == '__main__':main()

TuplesAndList.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
def main():
4+
#string
5+
Data="software engineer"
6+
print(Data[0:5])
7+
#List
8+
Ages=[44,33,45,33,54]
9+
Ages.append(100)
10+
Ages.insert(0,33)
11+
print(Ages)
12+
#Tuples
13+
Ages=[44,33,45,33,54]
14+
Ages.append(100)
15+
Ages.insert(0,33)
16+
print(Ages)
17+
18+
19+
20+
if __name__ == '__main__':main()

variables.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
3+
def main():
4+
5+
Amount=30 #amount of time spend on working
6+
data="{} is high".format(Amount) # format my data
7+
#data="%s is high"% Amount
8+
print(data,type(data))
9+
datalen="is good"
10+
print(len(datalen))
11+
print(datalen[1])
12+
13+
14+
15+
16+
17+
18+
if __name__ == '__main__':main()

0 commit comments

Comments
 (0)