# For loop indexli
z=range(5)
for i, data in enumerate(z):
    print(i, data)

#Dosya satırı okuma
for line in open("example.txt"):
    print(line)

#Swapping
a=5
b=6
a,b = b,a
print(a,b)

#List e başka bir list in değerlerini ekleme
x=[]
y=[1,2,3,4]
x.append(5)
x.extend(y)
print(x)

#List seriyi tersten okuma
x.reverse()
print(x)

#Sorting
z=[("aaa",5), ("ccc",4), ("bbb",3)]
z.sort()
print(z)

#Dictionary veri ekleme, iki yöntem var
d={}
d['a']=5
d['b']=6

d=dict(a=5, b=4, c=6)
print(d)

# Text deki verileri parse edip dict e atma
d={}
for line in open("example.txt"):
    val1, val2, val3 = line.split()
    d[val2]= val1 + val3
print(d)


cced7930aebec77ce082ae575fe9cf9e83888ca4
<mask token>

<mask token>
for i, data in enumerate(z):
    print(i, data)
for line in open('example.txt'):
    print(line)
<mask token>
print(a, b)
<mask token>
x.append(5)
x.extend(y)
print(x)
x.reverse()
print(x)
<mask token>
z.sort()
print(z)
<mask token>
print(d)
<mask token>
for line in open('example.txt'):
    val1, val2, val3 = line.split()
    d[val2] = val1 + val3
print(d)

z = range(5)
for i, data in enumerate(z):
    print(i, data)
for line in open('example.txt'):
    print(line)
a = 5
b = 6
a, b = b, a
print(a, b)
x = []
y = [1, 2, 3, 4]
x.append(5)
x.extend(y)
print(x)
x.reverse()
print(x)
z = [('aaa', 5), ('ccc', 4), ('bbb', 3)]
z.sort()
print(z)
d = {}
d['a'] = 5
d['b'] = 6
d = dict(a=5, b=4, c=6)
print(d)
d = {}
for line in open('example.txt'):
    val1, val2, val3 = line.split()
    d[val2] = val1 + val3
print(d)

# For loop indexli
z=range(5)
for i, data in enumerate(z):
    print(i, data)

#Dosya satırı okuma
for line in open("example.txt"):
    print(line)

#Swapping
a=5
b=6
a,b = b,a
print(a,b)

#List e başka bir list in değerlerini ekleme
x=[]
y=[1,2,3,4]
x.append(5)
x.extend(y)
print(x)

#List seriyi tersten okuma
x.reverse()
print(x)

#Sorting
z=[("aaa",5), ("ccc",4), ("bbb",3)]
z.sort()
print(z)

#Dictionary veri ekleme, iki yöntem var
d={}
d['a']=5
d['b']=6

d=dict(a=5, b=4, c=6)
print(d)

# Text deki verileri parse edip dict e atma
d={}
for line in open("example.txt"):
    val1, val2, val3 = line.split()
    d[val2]= val1 + val3
print(d)

