This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# requests modülüyle ilgili detaylı açıklamalar (ingilizce) http://requests.readthedocs.io/ sitesinde | |
# mac OS'te Python'a eklemek için terminal penceresinde (Python 3.x için) | |
# pip3 install requests | |
# windows'ta ekleme için komut penceresinde | |
# pip install requests | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import shelve | |
# "shelf" dosyalarında her listenin bir ismi olmak zorunda | |
# Bu modül kullanılarak bir shelf dosyasındafarklı isimlerle birden çok | |
# liste saklanabilir. | |
# Every list in a shelf file is required to have a name | |
# More than one list can be stored in a shelf file using |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! Python3 | |
import re | |
string = '[Hello, World Şeyma!]' | |
pattern = r'\b(\w+)\b' | |
sRegex = re.compile(pattern) | |
mo = sRegex.findall(string) | |
print(mo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3 | |
ilkTahta = [['a', 1],['a', 2],['a', 3], | |
['b', 1],['b', 2],['b', 3], | |
['c', 1],['c', 2],['c', 3]] | |
sonTahta = [['a', 1],['a', 2],['a', 3], | |
['b', 1],['b', 2],['b', 3], | |
['c', 1],['c', 2],['c', 3]] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kelimeNumara = {'A': '11', 'a': '11', 'E': '22', 'e': '22'} | |
kelime = input('Kelime giriniz: ') | |
kelime = list(kelime) | |
for i in range(len(kelime)): | |
if not kelimeNumara.get(kelime[i], False): | |
continue | |
else: | |
kelime[i] = kelimeNumara[kelime[i]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
c = ['a', 'b', ['f', 'g']] | |
print('original list c: ', c) | |
print('\ndirect assignment') | |
d = c | |
print('new list d: ', d) | |
print('primary list equivalence:', id(c) == id(d)) |