-
Notifications
You must be signed in to change notification settings - Fork 6
/
ders1.py
73 lines (37 loc) · 982 Bytes
/
ders1.py
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
"""
integer, floating point number, string, list, tupple, dict
"""
"""string = "GNU/Linux 2018"
sozluk = {"key1" : "value1", "key2" : "value2"}
for keys, values in sozluk.keys(), sozluk.values():
print(keys, values)
"""
matris = [
[1,2],
[4,5]
]
#print(matris)
"""
for row in matris:
for column in row:
print(column)
for i in range(len(matris)):
row = matris[i]
for j in range(len(row)):
print(row[j])
"""
"""
string = "9. Mustafa Akgül Özgür Yazılım Yaz Kampı!"
string2 = "adlkajsldkajslkjasllaksjdlasdlasks"
print(string, string2, end=":)", sep="\n"9
"""
string = "dokuzuncu Mustafa Akgül Özgür Yazılım Yaz Kampı!"
print(string.capitalize())
print(string.upper().lower().capitalize())
print(string.count("a"))
print(string.upper().count("A"))
print(string.upper())
print(string.replace("a", "e", 3))
print(string.split("a"))
print(" | ".join(["1","2","3","4","5"]))
print(" | ".join(string))