-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathday14.py
More file actions
24 lines (24 loc) · 836 Bytes
/
day14.py
File metadata and controls
24 lines (24 loc) · 836 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
#week3 ---day14
#divided the list تقسيم القوائم الى اجزاء
mylist =["muteb","fahad","ahmed","sultam"]
print(mylist[1:3])
#================================
# tn check if an elemnt of list exesit للتحقق من وجود عنصر في القوائم
fruite_list=["apple","banana","orange","cherry"]
if "apple" in fruite_list:
print(" yes, 'apple' in my best fruite list")
#=================================
#to repeate a vlue we can do :
thislist=[" انا متعب"]*4
print(thislist)
#=================================
#to add more one list we are use + opreator
thislist1=["muteb","age","gendere"]
thislist2=["alotaibi",33,"male"]
thislist3=thislist1+thislist2
print(thislist3)
#===============================
list_of1=[10,12,14,25,28]
list_of2=[11.50,41.55,15.82]
list_of3=list_of1+list_of2
print(list_of3)