-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathday7.py
More file actions
26 lines (21 loc) · 967 Bytes
/
day7.py
File metadata and controls
26 lines (21 loc) · 967 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
#week2
#day7
print("hello")
print('hello')
# assign string to a variable
a="hello saudi development"
print(a)
###################################
# assign multistring to a variable by using three quotes
a=''' im learning a python programming language here tp develop my self and gitting a good knowledge ,
we are finished the first week and now in the second week from the course'''
print(a)
# strings in python are arrays
a="hello, world"
print(a[1]) # يتم تخزين النصوص في البايثون كمصفوفة وويبدأ ترقيم المصفوفة من 0
###################################################
#Substring. Get the characters from position 2 to position 5 (not included)
#نقوم بتقسيم النص وتجزيئه من خلال العمل على اخذ عناصر المصفوفة من (2-5)
a="hello, world"
print(a[2:5]) # نقوم باخذ العناصر من 2 وحتى ماقبل 5
######################################